DEV Community

Tim Chen
Tim Chen

Posted on

My first opensource agent cli & sdk

I built tinyagent to explore how little code is needed to implement a useful AI agent.

The focus is the core loop, plus just enough sessions, memory, MCP, and skills to make it practical.

It’s a single user, single process runtime with a CLI and Python SDK.

GitHub logo timczm / tinyagent

The core agent loop in a small Python codebase

English | 简体中文

A lightweight Python agent for one trusted user and one running instance.

tinyagent provides a command-line interface and an in-process Python SDK, with support for DeepSeek and custom OpenAI-compatible providers, persistent sessions, workspace tools, layered memory, MCP servers, and progressively loaded skills.

tinyagent requires Python 3.11 or later and currently targets Linux first.

Highlights

  • One runtime, two interfaces: the CLI and Python SDK share the same async agent runtime.
  • Provider flexibility: use DeepSeek out of the box or configure another OpenAI-compatible Chat Completions endpoint.
  • Persistent work: sessions and complete message history are stored in SQLite outside the workspace.
  • Workspace-aware tools: read, write, patch, list, and execute commands within a validated workspace boundary.
  • Layered memory: combine compacted conversation context with curated, human-readable long-term memory.
  • MCP integration: connect remote Streamable HTTP servers or local stdio servers through an explicit tool registry.
  • Progressive skills: keep reusable instructions in SKILL.md files…

Top comments (0)