Skip to content
xLongLinkPublic

About

Python agent shell distributed as a container

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

PyShell banner

An Agent and a Python Shell

Tests License: MIT Docker required


What it does

Traditional AI chat generates text. PyShell generates and executes Python code in a persistent runtime, using execution results to drive the conversation.

Benefits

  • 🧠 Persistent sessions: Variables, imports, and execution context carry over between tasks.
  • 🔌 No MCP servers needed: Install Python libraries and let the agent discover and use their APIs directly.
  • 🔄 Execution feedback: The agent observes output and errors, correcting mistakes and iterating automatically.
  • 📊 Interactive visualizations: The agent creates and updates charts, graphs, and maps directly in your browser.
  • 🎙️ Voice-driven: A voice agent understands your requests and delegates execution to a Python worker.
demo.mp4

Model

Accepted adapter: LongLink/pyshell-worker. Base model: Qwen/Qwen3.5-9B.

Task success: 58.33% (35/60 tasks). Valid Python: 99.38% (159/160 responses).

Evaluation date (UTC): 2026-11-11T15:01:13.152443+00:00. Evaluation workflow.


Try it locally

Set OPENAI_API_KEY in sample/.env, then run from the repository root:

make up

Open http://127.0.0.1:8010 in your browser.


How it works

PyShell architecture

  1. Speak: Give instructions to the voice agent in natural language.
  2. Delegate: The voice agent understands your request and passes the task to a Python worker.
  3. Execute & iterate: The worker discovers available Python libraries, writes and executes code, and uses output and errors to refine its actions.
  4. Visualize: Results appear as interactive charts and visualizations directly in your browser.
  5. Persist: Variables, data, and execution context remain available for follow-up tasks.

Development

Run from the repository root:

make up         # Setup the local server
make down       # Stop and remove the containers
make test       # Testing
make format     # Format the code
make logs       # Show the container logs


LongLink 2026

MIT License   -   Contributing   -   Code of Conduct   -   Contact


About

Python agent shell distributed as a container

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages