{"id":50641330,"url":"https://github.com/pharo-llm/pharo-agent","last_synced_at":"2026-06-07T08:31:01.099Z","repository":{"id":351875737,"uuid":"1192672017","full_name":"pharo-llm/pharo-agent","owner":"pharo-llm","description":"A agent for interacting with the Pharo image from the terminal.","archived":false,"fork":false,"pushed_at":"2026-05-21T14:10:44.000Z","size":96,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-21T22:27:11.687Z","etag":null,"topics":["agents","pharo","pharo-llm"],"latest_commit_sha":null,"homepage":"","language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pharo-llm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-26T12:57:26.000Z","updated_at":"2026-05-21T14:17:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pharo-llm/pharo-agent","commit_stats":null,"previous_names":["pharo-llm/pharo-agent"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pharo-llm/pharo-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-llm%2Fpharo-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-llm%2Fpharo-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-llm%2Fpharo-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-llm%2Fpharo-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pharo-llm","download_url":"https://codeload.github.com/pharo-llm/pharo-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-llm%2Fpharo-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34014821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","pharo","pharo-llm"],"created_at":"2026-06-07T08:31:00.749Z","updated_at":"2026-06-07T08:31:01.093Z","avatar_url":"https://github.com/pharo-llm.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PharoAgent\n\n[![Pharo 13 \u0026 14](https://img.shields.io/badge/Pharo-13%20%7C%2014-2c98f0.svg)](https://github.com/pharo-llm/pharo-agent)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/pharo-llm/pharo-agent/blob/master/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/pharo-llm/pharo-agent/pulls)\n[![Status: Active](https://img.shields.io/badge/status-active-success.svg)](https://github.com/pharo-llm/pharo-agent)\n[![CI](https://github.com/pharo-llm/chatpharo/actions/workflows/CI.yml/badge.svg)](https://github.com/pharo-llm/pharo-agent/actions/workflows/CI.yml)\n\n\nPharoAgent is a lightweight TCP server for Pharo that lets external tools send Smalltalk snippets for evaluation and trigger browser navigation commands.\n\nTo install stable version of `PharoAgent` in your image you can use:\n\n```smalltalk\nMetacello new\n  githubUser: 'pharo-llm' project: 'pharo-agent' commitish: 'X.X.X' path: 'src';\n  baseline: 'LLMPharoAgent';\n  load\n```\n\n\nFor development version install it with this:\n\n```smalltalk\nMetacello new\n  githubUser: 'pharo-llm' project: 'pharo-agent' commitish: 'main' path: 'src';\n  baseline: 'LLMPharoAgent';\n  load.\n```\n\n## Start the agent\n\nIn the Playground, run:\n\n```smalltalk\nPharoAgent start\n````\n\nTo use a custom port:\n\n```smalltalk\nPharoAgent startOn: 4044\n```\n\n## Restart cleanly\n\nIf you reloaded the class and want a fresh restart, run:\n\n```smalltalk\nPharoAgent stop.\nPharoAgent resetDefault.\nPharoAgent start\n```\n\n## Evaluate an expression\n\n```bash\necho \"3 + 4\" | nc localhost 4044\n```\n\nExpected output:\n\n```text\n7\n```\n\n## Open a class browser\n\n```bash\necho \"OPEN_CLASS_BROWSER String\" | nc localhost 4044\n```\n\n\n## Talk to the live image from Claude Code, Codex, or Qwen (MCP)\n\nPharoAgent ships with an MCP server (`LLM-Pharo-MCP`) that exposes the running\nimage over HTTP so CLI agents like [Claude Code](https://claude.com/claude-code),\nCodex, or Qwen Code can talk directly to it — evaluate Smalltalk, open browsers,\nread class and method source, create classes, and compile methods — without\nspawning a fresh headless Pharo per call.\n\n### Start the MCP server\n\nIn a Playground:\n\n```smalltalk\nPharoAgent startMcp.\n\"or on a custom port\"\nPharoAgent startMcpOn: 4046.\n```\n\nThe server listens on `http://localhost:4046/mcp` by default. Override with the\n`PHARO_MCP_PORT` environment variable before launching the image.\n\nTo stop it:\n\n```smalltalk\nPharoAgent stopMcp.\n```\n\n### Configure your CLI agent\n\nThe repo ships a ready-to-use `.mcp.json` at the root:\n\n```json\n{\n  \"mcpServers\": {\n    \"pharo\": {\n      \"type\": \"http\",\n      \"url\": \"http://localhost:4046/mcp\"\n    }\n  }\n}\n```\n\nClaude Code picks it up automatically when started from the repo root. For\nCodex, Qwen or any other MCP-speaking client, point its MCP config at the same\nURL.\n\n### Registered tools\n\n| Tool                         | Description                                                   |\n| ---------------------------- | ------------------------------------------------------------- |\n| `pharo_eval`                 | Evaluate a Smalltalk expression, returns its `printString`    |\n| `pharo_open_class_browser`   | Open a System Browser on the given class                      |\n| `pharo_open_method_browser`  | Open a System Browser on `ClassName\u003e\u003eselector`                |\n| `pharo_class_source`         | Return the class definition and its selector list             |\n| `pharo_method_source`        | Return the source of a single method                          |\n| `pharo_create_class`         | Create a class in the live image                              |\n| `pharo_compile_method`       | Compile an instance-side or class-side method                 |\n\n### Registered resources\n\n| URI                                       | Description                             |\n| ----------------------------------------- | --------------------------------------- |\n| `pharo://system/info`                     | Pharo version, package count, image path |\n| `pharo://class/{className}`               | Class definition + method list          |\n| `pharo://method/{className}/{selector}`   | Source of a single method               |\n\n### Example terminal-driven edits\n\nOnce the MCP server is running, a connected terminal agent can ask Pharo to do\nreal image edits such as:\n\n- create `MyCounter` as a subclass of `Object` in package `Demo-Core`\n- compile `value ^ 42` on `MyCounter`\n- compile `default ^ self new` on the class side of `MyCounter`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-llm%2Fpharo-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpharo-llm%2Fpharo-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-llm%2Fpharo-agent/lists"}