Skip to main content

AgentKit

中文版本

AgentKit is a general-purpose framework for tool-using LLM agents. It provides workspace isolation, a unified LLM abstraction, a tool-execution loop, and both CLI and Python SDK entry points.

Current Capabilities

  • Strong workspace isolation: all agent-visible file access goes through WorkspaceFS
  • Unified LLM abstraction: ConversationItem / ConversationState / UnifiedLLMRequest / UnifiedLLMResponse
  • Provider support (sync, non-streaming, text)
    • OpenAI (responses / chat_completions)
    • Anthropic (messages)
    • Gemini (generateContent)
    • Qwen (OpenAI-compatible chat_completions)
    • vLLM (OpenAI-compatible chat_completions)
  • Registry-based tool system with built-in tools under src/agentkit/tools/library/ and custom tool loading from project file/directory entries
  • Agent loop that coordinates model reasoning and tool execution under step/time budgets
  • Run logs written to workspace/logs/run_<run_id>.jsonl

Status

  • The repository includes unit tests for the agent loop, CLI, tool system, runlog, and the OpenAI / Anthropic / Gemini / Qwen / vLLM provider adapters
  • There is no smoke-test coverage against live upstream APIs yet, so a final end-to-end validation against the target model is still recommended before production use

Documentation

Full documentation lives under docs/agentkit/. The published site is GitHub Pages and deploys automatically from pushes to main.

Install From Source

uv sync
uv run agentkit --help

Install From PyPI

pip install base-agentkit
agentkit --help

The import path and CLI command stay the same after installation:

from agentkit import create_agent

Example Configuration

vLLM

workspace:
  root: "./vllm_workspace"

provider:
  kind: "vllm"
  model: "glm-5"
  openai_api_variant: "chat_completions"
  conversation_mode: "auto"
  base_url: "http://localhost:8000/v1"
  api_key: "empty"
  temperature: 0.8
  timeout_s: 600
  retries: 2
  enable_thinking: true

agent:
  system_prompt: "You are a helpful agent. Use tools when needed."
  budget:
    max_steps: 200
    time_budget_s: 1800
    max_input_chars: 180000

tools:
  entries:
    - "./tools"
  allowed:
    - "view"
    - "create_file"
    - "str_replace"
    - "word_count"

runlog:
  enabled: true
  redact: true
  max_text_chars: 20000

Run From The CLI

export OPENAI_API_KEY="your-key"
uv run agentkit --config path/to/config.yaml run --task "List the files in the current workspace"

Python SDK

from agentkit import create_agent

agent = create_agent("path/to/config.yaml")
report = agent.run("Create notes/todo.txt in the workspace and write today's plan")
print(report.final_output)

Project Layout

The core implementation lives under src/agentkit/:

  • config/: configuration schema and loader
  • workspace/: strict filesystem isolation and workspace layout
  • llm/: unified abstractions, provider base/factory, and adapters
  • tools/: tool abstractions, registry, and autoloading
  • agent/: budgets, reports, runtime, and the agent loop
  • runlog/: structured events, event sinks, and JSONL runlogs
  • cli/: command-line entry point

Metadata

Release files for base-agentkit 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for base-agentkit 0.1.2
File Size Uploaded
base_agentkit-0.1.2.tar.gz 52.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for base-agentkit 0.1.2
File Interpreter ABI Platform
base_agentkit-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 128.8 kB

Release files / base_agentkit-0.1.2.tar.gz

Download URL base_agentkit-0.1.2.tar.gz
Size 52.5 kB
Tags Source
SHA-256 checksum
How to use checksums
31bb951f8734e73e7fd3538a9910103331051a53b2f074bccc931d8b118d44ef
BLAKE2b-256 checksum
How to use checksums
48d51914767a4fe81102869b090afc90291d69eacc1838c9b7735719f3d2bf61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.

Transparency log

Release files / base_agentkit-0.1.2-py3-none-any.whl

Download URL base_agentkit-0.1.2-py3-none-any.whl
Size 76.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68b5ad87311a75cae73daba3e7ccd01a38920f4368af6d7352a6a80f91781a4a
BLAKE2b-256 checksum
How to use checksums
d31a150ef4611e480c2a5325b43e30c2382c7d1d077debd4f77c8e360fb3a7f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page