Skip to content
 
 

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 中文 | Français

YuXiang Code logo

YuXiang Code

An autonomous agent is just an LLM + tools + a loop.

Python 3.10+ DeepSeek OpenAI compatible Streaming SSE Local CLI Tools

A tiny, inspectable code agent for people who prefer plain files, visible tool calls, and boring loops that actually work.


Philosophy

Choice Reason
No Plan Mode Use a plain PLAN.md file instead. It is visible, versionable, and shareable across conversations.
No MCP integration Tool descriptions can consume real context budget. CLI tools plus README files are loaded through bash only when needed.
No Sub-agents A hidden agent inside another hidden agent reduces observability. Use bash to call another process when you need one.
No maxSteps ceremony The loop should end naturally when the task is done. Add step limits only when a real problem appears.
No permission theater Once an agent can write and run code, fake safety prompts are not a security model. Keep the surface local and inspectable.

YuXiang Code is intentionally small. It does not try to become an operating system for agents. It keeps the core loop visible:

user -> LLM -> tool call -> tool result -> LLM -> done

The point is not to hide complexity behind another framework. The point is to make the agent understandable enough that you can debug it while it is running.

What It Is

  • Streaming terminal chat with visible tool calls.
  • Local tools for bash, read, write, and edit.
  • Manual context controls so you can inspect, trim, save, and rewrite the exact model context.
  • A local-first CLI, not a hosted agent platform.

That is the product. Everything else has to earn its place.

Quick Start

$env:DEEPSEEK_API_KEY="your-key"
python -m pip install -e .
python .\code_agent.py

Commands

Only slash-prefixed commands are interpreted as commands. history is normal chat text; /history opens the active context panel.

/help              show commands
/models            show built-in DeepSeek model names
/history           show the full active model context
/context           alias of /history
/clear             clear context and prompt history
/keep [n]          keep only last n context messages
/drop INDEX        remove one context message
/set INDEX text    replace one context message
/system text       replace the system prompt
/save              save context to .agent_context.json
/load              load context from .agent_context.json
/model [name]      show or change model
/exit              quit

Project Layout

.
|-- code_agent.py
|-- pyproject.toml
|-- assets/
`-- src/
    `-- mini_code_agent/
        |-- api.py
        |-- app.py
        |-- config.py
        |-- models.py
        |-- prompt.py
        |-- session.py
        |-- tools.py
        `-- ui.py

License

MIT

About

YuXiang was not satisfied about all the code agent in the world, so he built one

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages