{"id":39082117,"url":"https://github.com/ly0/ultrathink","last_synced_at":"2026-01-17T18:31:40.755Z","repository":{"id":328856274,"uuid":"1116079397","full_name":"ly0/ultrathink","owner":"ly0","description":"Simple Claude code for experimental usages in 5 minutes. The project name `ultrathink` is a mistake by claude code! Okay so be it.","archived":false,"fork":false,"pushed_at":"2025-12-18T06:29:12.000Z","size":458,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T07:40:43.549Z","etag":null,"topics":["agents","claude","claude-code","deepagent","langchain"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ly0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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":"2025-12-14T06:35:28.000Z","updated_at":"2026-01-09T02:11:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ly0/ultrathink","commit_stats":null,"previous_names":["ly0/ultrathink"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ly0/ultrathink","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ly0%2Fultrathink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ly0%2Fultrathink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ly0%2Fultrathink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ly0%2Fultrathink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ly0","download_url":"https://codeload.github.com/ly0/ultrathink/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ly0%2Fultrathink/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28515794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:28:00.501Z","status":"ssl_error","status_checked_at":"2026-01-17T18:28:00.150Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","claude","claude-code","deepagent","langchain"],"created_at":"2026-01-17T18:31:39.445Z","updated_at":"2026-01-17T18:31:40.704Z","avatar_url":"https://github.com/ly0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ultrathink\n\nAI-powered coding assistant built on [deepagent](https://github.com/langchain-ai/deepagents) and [LangChain](https://github.com/langchain-ai/langchain).\n\n![Ultrathink Screenshot](assets/screenshot.jpg)\n\n---\n\n\u003e **Important Disclaimers**\n\u003e\n\u003e 1. **Origin**: This project was generated based on [ripperdoc](https://github.com/quantmew/ripperdoc) as a quick experiment with the LangChain/deepagent framework.\n\u003e\n\u003e 2. **Experimental Only**: This is purely an experimental project for exploring ideas. **No special consideration has been given to permission restrictions or security protections.** Use or modify at your own risk. For production use, please consider [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or [ripperdoc](https://github.com/quantmew/ripperdoc).\n\u003e\n\u003e 3. **Default API**: This project uses **DeepSeek** as the default API provider.\n\n---\n\n## Features\n\n### Core Capabilities\n\n- **Interactive CLI** - Rich terminal interface with real-time thinking process display\n- **Multi-model Support** - Works with DeepSeek, Anthropic Claude, OpenAI GPT, and Google Gemini\n- **DeepSeek Reasoner** - Native support for DeepSeek Reasoner with thinking chain display\n- **Built-in Tools** - File operations, code search, bash execution, task management\n- **Subagent System** - Delegate tasks to specialized agents (explore, research, code-review)\n- **MCP Integration** - Extend functionality with Model Context Protocol servers\n- **Python SDK** - Use programmatically in your applications\n\n### Web UI\n\nModern web interface compatible with LangGraph SDK, providing a visual chat experience.\n\n![Ultrathink Web UI](assets/webui.png)\n\n**Features:**\n- Real-time streaming responses with Server-Sent Events (SSE)\n- Thread management with conversation history\n- Clean, responsive design built with Next.js and Tailwind CSS\n\n**Quick Start:**\n```bash\nultrathink serve              # Start at http://localhost:8000\nultrathink serve --port 3000  # Custom port\nultrathink serve --no-frontend  # API only mode\n```\n\n### CLI Features\n\n- **Slash Commands** - `/help`, `/clear`, `/models`, `/stats`, `/history`, `/compact`\n- **Command Autocomplete** - Tab completion for slash commands and subcommands\n- **Model Management** - `/models` command for managing model profiles and aliases\n- **Conversation History** - Persistent history with file-based storage\n- **Thinking Display** - Visual spinner and content display for reasoning models\n\n### Model Management (`/models`)\n\nFull-featured model profile and alias management:\n\n```bash\n/models list              # List all profiles and aliases\n/models add \u003cname\u003e \u003cprovider:model\u003e [--api-key KEY] [--base-url URL]\n/models update \u003cname\u003e [--api-key KEY] [--base-url URL] [--model MODEL]\n/models remove \u003cname\u003e     # Remove a profile\n/models alias \u003calias\u003e \u003cprofile\u003e    # Create custom alias\n/models unalias \u003calias\u003e   # Remove custom alias\n/models use \u003cname\u003e        # Set as main model\n```\n\nSupported providers: `deepseek`, `anthropic`, `openai`, `gemini`\n\n### Built-in Subagents\n\n| Agent | Description |\n|-------|-------------|\n| `explore` | Fast codebase exploration and file search |\n| `research` | Deep research with comprehensive analysis |\n| `code-review` | Code review and quality analysis |\n| `refactor` | Code restructuring and architecture improvements |\n| `test` | Writing and analyzing tests |\n\nUse `/agents` command to see all available agents including custom ones.\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/ultrathink/ultrathink.git\ncd ultrathink\npip install -e .\n```\n\n## Quick Start\n\n### Environment Setup\n\nSet your API key (DeepSeek by default):\n\n```bash\nexport DEEPSEEK_API_KEY=\"your-key-here\"\n```\n\nOr use other providers:\n\n```bash\nexport ANTHROPIC_API_KEY=\"your-key-here\"\nexport OPENAI_API_KEY=\"your-key-here\"\nexport GEMINI_API_KEY=\"your-key-here\"\n```\n\nOr configure via `/models` command in interactive mode.\n\n### CLI Mode\n\n```bash\n# Start interactive mode\nultrathink\n\n# Or use the short alias\nut\n\n# Execute a single command\nultrathink -p \"Explain this codebase\"\n\n# Use a specific model\nultrathink --model deepseek:deepseek-reasoner\nultrathink --model anthropic:claude-sonnet-4-20250514\n```\n\n### Slash Commands\n\nIn interactive mode:\n\n| Command | Description |\n|---------|-------------|\n| `/help` | Show available commands |\n| `/clear` | Clear conversation history |\n| `/models` | Manage model profiles and aliases |\n| `/agents` | List available subagents |\n| `/history` | Show conversation history |\n| `/stats` | Show session statistics |\n| `/compact` | Compact conversation history |\n| `/exit` | Exit the application |\n\n### Python SDK\n\n```python\nimport asyncio\nfrom ultrathink import UltrathinkClient\n\nasync def main():\n    async with UltrathinkClient() as client:\n        result = await client.query(\"Explain this function\")\n        print(result.content)\n\nasyncio.run(main())\n```\n\n#### Streaming Responses\n\n```python\nasync def stream_example():\n    async with UltrathinkClient() as client:\n        async for chunk in client.stream(\"Write a hello world function\"):\n            print(chunk, end=\"\", flush=True)\n```\n\n#### Custom Configuration\n\n```python\nfrom ultrathink.sdk.client import UltrathinkClient, UltrathinkOptions\n\noptions = UltrathinkOptions(\n    model=\"deepseek:deepseek-reasoner\",\n    safe_mode=True,\n    verbose=False,\n)\n\nasync with UltrathinkClient(options) as client:\n    result = await client.query(\"Your prompt here\")\n```\n\n## Configuration\n\n### Global Configuration\n\nLocated at `~/.ultrathink.json`:\n\n```json\n{\n  \"model_profiles\": {\n    \"default\": {\n      \"provider\": \"deepseek\",\n      \"model\": \"deepseek-reasoner\",\n      \"api_base\": \"https://api.deepseek.com/v1\",\n      \"api_key\": \"sk-xxx\"\n    }\n  },\n  \"model_pointers\": {\n    \"main\": \"default\",\n    \"task\": \"default\",\n    \"quick\": \"default\",\n    \"custom\": {}\n  },\n  \"has_completed_onboarding\": true\n}\n```\n\n### Model Aliases\n\n- **Built-in aliases**: `main`, `task`, `quick` (always point to a profile)\n- **Custom aliases**: User-defined aliases for use in subagents or tools\n\n```bash\n/models alias my-fast default    # Create custom alias\n/models unalias my-fast          # Remove custom alias\n```\n\n### MCP Integration\n\nUltrathink supports [Model Context Protocol](https://modelcontextprotocol.io/) servers.\n\nCreate `mcp_config.json` in your project:\n\n```json\n{\n  \"mcpServers\": {\n    \"my-server\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@my/mcp-server\"]\n    }\n  }\n}\n```\n\nMCP tools will be automatically loaded and available to the agent.\n\n## Custom Subagents\n\nCreate custom subagents in `~/.ultrathink/agents/` or `.ultrathink/agents/`:\n\n```yaml\n# my-agent.yaml\nname: my-agent\ndescription: Custom agent for specific tasks\ntools:\n  - read_file\n  - write_file\n  - grep\nsystem_prompt: |\n  You are a specialized agent for...\n```\n\nOr use Markdown with frontmatter:\n\n```markdown\n---\nname: my-agent\ndescription: Custom agent for specific tasks\ntools:\n  - read_file\n  - write_file\n---\n\nYou are a specialized agent for...\n```\n\n## Project Structure\n\n```\nultrathink/\n├── api/                     # Web API (FastAPI)\n│   ├── app.py               # FastAPI application\n│   ├── routes/              # API endpoints\n│   └── services/            # Business logic\n├── cli/\n│   ├── main.py              # CLI entry point\n│   ├── commands/            # Slash commands\n│   └── ui/\n│       ├── rich_console.py  # Rich interactive interface\n│       └── thinking_spinner.py\n├── core/\n│   ├── agent_factory.py     # Agent creation\n│   ├── config.py            # Configuration management\n│   ├── session.py           # Session state\n│   └── system_prompt.py     # System prompts\n├── models/\n│   └── deepseek_reasoner.py # DeepSeek Reasoner support\n├── tools/                   # Custom tools\n│   ├── filesystem.py\n│   └── ask_user.py\n├── middleware/              # Agent middleware\n├── sdk/\n│   └── client.py            # Python SDK\n└── web/                     # Web UI (Next.js)\n    ├── src/                 # React components\n    ├── public/              # Static assets\n    └── out/                 # Built frontend (auto-generated)\n```\n\n## Development\n\n```bash\n# Install with dev dependencies\npip install -e \".[dev]\"\n\n# Run tests\npytest\n\n# Run linter\nruff check .\n\n# Run type checker\nmypy ultrathink\n```\n\n## License\n\nApache 2.0\n\n## Acknowledgments\n\n- [ripperdoc](https://github.com/quantmew/ripperdoc) - Original inspiration and reference implementation\n- [deepagent](https://github.com/langchain-ai/deepagents) - Agent framework\n- [LangChain](https://github.com/langchain-ai/langchain) - LLM application framework\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fly0%2Fultrathink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fly0%2Fultrathink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fly0%2Fultrathink/lists"}