agent-kit-ai 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_kit_ai-0.4.0/.gitignore +30 -0
- agent_kit_ai-0.4.0/CHANGELOG.md +90 -0
- agent_kit_ai-0.4.0/LICENSE +76 -0
- agent_kit_ai-0.4.0/PKG-INFO +816 -0
- agent_kit_ai-0.4.0/README.md +764 -0
- agent_kit_ai-0.4.0/agent_kit/__init__.py +39 -0
- agent_kit_ai-0.4.0/agent_kit/agent/__init__.py +4 -0
- agent_kit_ai-0.4.0/agent_kit/agent/agent.py +405 -0
- agent_kit_ai-0.4.0/agent_kit/agent/delegation.py +211 -0
- agent_kit_ai-0.4.0/agent_kit/agent/loop.py +1054 -0
- agent_kit_ai-0.4.0/agent_kit/audit/__init__.py +3 -0
- agent_kit_ai-0.4.0/agent_kit/audit/chain.py +148 -0
- agent_kit_ai-0.4.0/agent_kit/cli.py +49 -0
- agent_kit_ai-0.4.0/agent_kit/cloud/__init__.py +5 -0
- agent_kit_ai-0.4.0/agent_kit/cloud/budgets.py +114 -0
- agent_kit_ai-0.4.0/agent_kit/cloud/models.py +32 -0
- agent_kit_ai-0.4.0/agent_kit/cloud/reporter.py +405 -0
- agent_kit_ai-0.4.0/agent_kit/compliance.py +170 -0
- agent_kit_ai-0.4.0/agent_kit/durable/__init__.py +16 -0
- agent_kit_ai-0.4.0/agent_kit/durable/checkpointer.py +48 -0
- agent_kit_ai-0.4.0/agent_kit/durable/models.py +60 -0
- agent_kit_ai-0.4.0/agent_kit/durable/store.py +136 -0
- agent_kit_ai-0.4.0/agent_kit/exceptions.py +170 -0
- agent_kit_ai-0.4.0/agent_kit/hooks.py +185 -0
- agent_kit_ai-0.4.0/agent_kit/integrations/__init__.py +8 -0
- agent_kit_ai-0.4.0/agent_kit/integrations/claude_agent_sdk.py +304 -0
- agent_kit_ai-0.4.0/agent_kit/integrations/openai_agents.py +225 -0
- agent_kit_ai-0.4.0/agent_kit/integrations/recorder.py +312 -0
- agent_kit_ai-0.4.0/agent_kit/memory/__init__.py +4 -0
- agent_kit_ai-0.4.0/agent_kit/memory/budget.py +45 -0
- agent_kit_ai-0.4.0/agent_kit/memory/in_memory.py +73 -0
- agent_kit_ai-0.4.0/agent_kit/memory/sqlite.py +181 -0
- agent_kit_ai-0.4.0/agent_kit/memory/window.py +39 -0
- agent_kit_ai-0.4.0/agent_kit/observability/__init__.py +4 -0
- agent_kit_ai-0.4.0/agent_kit/observability/tracer.py +222 -0
- agent_kit_ai-0.4.0/agent_kit/orchestrator/__init__.py +4 -0
- agent_kit_ai-0.4.0/agent_kit/orchestrator/dag.py +211 -0
- agent_kit_ai-0.4.0/agent_kit/orchestrator/pipeline.py +79 -0
- agent_kit_ai-0.4.0/agent_kit/output.py +183 -0
- agent_kit_ai-0.4.0/agent_kit/providers/__init__.py +19 -0
- agent_kit_ai-0.4.0/agent_kit/providers/anthropic.py +414 -0
- agent_kit_ai-0.4.0/agent_kit/providers/base.py +85 -0
- agent_kit_ai-0.4.0/agent_kit/providers/ollama.py +57 -0
- agent_kit_ai-0.4.0/agent_kit/providers/openai.py +316 -0
- agent_kit_ai-0.4.0/agent_kit/providers/pricing.py +25 -0
- agent_kit_ai-0.4.0/agent_kit/py.typed +0 -0
- agent_kit_ai-0.4.0/agent_kit/reliability/__init__.py +13 -0
- agent_kit_ai-0.4.0/agent_kit/reliability/circuit_breaker.py +152 -0
- agent_kit_ai-0.4.0/agent_kit/reliability/retry.py +78 -0
- agent_kit_ai-0.4.0/agent_kit/scanning/__init__.py +29 -0
- agent_kit_ai-0.4.0/agent_kit/scanning/base.py +70 -0
- agent_kit_ai-0.4.0/agent_kit/scanning/nullcone.py +263 -0
- agent_kit_ai-0.4.0/agent_kit/scanning/patterns.py +114 -0
- agent_kit_ai-0.4.0/agent_kit/scanning/policy.py +72 -0
- agent_kit_ai-0.4.0/agent_kit/tools/__init__.py +4 -0
- agent_kit_ai-0.4.0/agent_kit/tools/base.py +148 -0
- agent_kit_ai-0.4.0/agent_kit/tools/mcp.py +328 -0
- agent_kit_ai-0.4.0/agent_kit/tools/registry.py +52 -0
- agent_kit_ai-0.4.0/agent_kit/types.py +270 -0
- agent_kit_ai-0.4.0/examples/README.md +36 -0
- agent_kit_ai-0.4.0/examples/approval_gate.py +72 -0
- agent_kit_ai-0.4.0/examples/claude_agent_sdk_monitored.py +31 -0
- agent_kit_ai-0.4.0/examples/cloud_monitored.py +148 -0
- agent_kit_ai-0.4.0/examples/delegation.py +72 -0
- agent_kit_ai-0.4.0/examples/durable_approval.py +47 -0
- agent_kit_ai-0.4.0/examples/hello_agent.py +16 -0
- agent_kit_ai-0.4.0/examples/long_running_agent.py +42 -0
- agent_kit_ai-0.4.0/examples/mcp_tools.py +39 -0
- agent_kit_ai-0.4.0/examples/multi_tool_agent.py +54 -0
- agent_kit_ai-0.4.0/examples/openai_agents_monitored.py +33 -0
- agent_kit_ai-0.4.0/examples/pipeline_example.py +40 -0
- agent_kit_ai-0.4.0/examples/research_dag.py +85 -0
- agent_kit_ai-0.4.0/examples/safe_agent.py +111 -0
- agent_kit_ai-0.4.0/examples/scanned_tools.py +53 -0
- agent_kit_ai-0.4.0/examples/typed_output.py +47 -0
- agent_kit_ai-0.4.0/pyproject.toml +83 -0
- agent_kit_ai-0.4.0/tests/conftest.py +121 -0
- agent_kit_ai-0.4.0/tests/fixtures/mcp_fixture_server.py +74 -0
- agent_kit_ai-0.4.0/tests/injection_fixtures.py +75 -0
- agent_kit_ai-0.4.0/tests/test_agent.py +334 -0
- agent_kit_ai-0.4.0/tests/test_agent_tool.py +547 -0
- agent_kit_ai-0.4.0/tests/test_audit.py +90 -0
- agent_kit_ai-0.4.0/tests/test_budgets.py +178 -0
- agent_kit_ai-0.4.0/tests/test_circuit_breaker.py +112 -0
- agent_kit_ai-0.4.0/tests/test_cloud_reporter.py +342 -0
- agent_kit_ai-0.4.0/tests/test_compliance.py +157 -0
- agent_kit_ai-0.4.0/tests/test_context_budget.py +235 -0
- agent_kit_ai-0.4.0/tests/test_dag.py +209 -0
- agent_kit_ai-0.4.0/tests/test_durable_runs.py +290 -0
- agent_kit_ai-0.4.0/tests/test_hooks.py +385 -0
- agent_kit_ai-0.4.0/tests/test_integrations_claude.py +385 -0
- agent_kit_ai-0.4.0/tests/test_integrations_openai_agents.py +183 -0
- agent_kit_ai-0.4.0/tests/test_integrations_recorder.py +157 -0
- agent_kit_ai-0.4.0/tests/test_mcp.py +241 -0
- agent_kit_ai-0.4.0/tests/test_memory_window.py +128 -0
- agent_kit_ai-0.4.0/tests/test_output.py +181 -0
- agent_kit_ai-0.4.0/tests/test_pipeline.py +68 -0
- agent_kit_ai-0.4.0/tests/test_provider_requests.py +690 -0
- agent_kit_ai-0.4.0/tests/test_retry.py +91 -0
- agent_kit_ai-0.4.0/tests/test_run_store.py +118 -0
- agent_kit_ai-0.4.0/tests/test_scanning.py +585 -0
- agent_kit_ai-0.4.0/tests/test_sqlite_memory.py +145 -0
- agent_kit_ai-0.4.0/tests/test_tools.py +131 -0
- agent_kit_ai-0.4.0/tests/test_typed_results.py +255 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.pyo
|
|
4
|
+
*.pyd
|
|
5
|
+
.Python
|
|
6
|
+
*.egg
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
.eggs/
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
env/
|
|
14
|
+
.env
|
|
15
|
+
*.so
|
|
16
|
+
.pytest_cache/
|
|
17
|
+
.mypy_cache/
|
|
18
|
+
.ruff_cache/
|
|
19
|
+
htmlcov/
|
|
20
|
+
.coverage
|
|
21
|
+
coverage.xml
|
|
22
|
+
*.log
|
|
23
|
+
|
|
24
|
+
# Local agent instructions — contains private infra details, keep out of VCS
|
|
25
|
+
CLAUDE.md
|
|
26
|
+
|
|
27
|
+
# Local SQLite databases (dev server, alembic smoke tests)
|
|
28
|
+
*.db
|
|
29
|
+
*.db-journal
|
|
30
|
+
*.sqlite3
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to agent-kit are documented here.
|
|
4
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.4.0] — 2026-09-15
|
|
9
|
+
|
|
10
|
+
First release on PyPI, as **`agent-kit-ai`** (`pip install agent-kit-ai`; the import name stays `agent_kit`, the CLI stays `agent-kit`). The name `agent-kit` is unavailable on PyPI.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Tool output scanning.** `Hooks(after_tool=[scan_tool_output(PatternScanner(), NullconeScanner())])` screens every tool result — web pages, MCP results, child-agent answers — before the model reads it. `PatternScanner` catches hidden Unicode tag text, chat-template control tokens, instruction overrides, bidi and zero-width tricks, encoded payloads, markdown data exfiltration, and jailbreak persona switches; `NullconeScanner` looks up URLs, domains, IPs, and hashes found in the output against the Nullcone threat database (opt-in, cached, fail-open, confidence-filtered, pauses on HTTP 429). The most severe finding decides: stop the run (`stop_run_at`), block the output (`block_at`, default high), wrap it in an `agentkit_scan` untrusted-content envelope (`warn_at`, default medium), or allow and record. Hook decisions carry `findings`; the loop records them as `tool_output_flagged` audit events and Cloud events (rule metadata only, never output), and agent-kit Cloud gains a `tool_output_flagged` alert rule with `min_severity`. A lead agent's scanner covers its delegated children, and a hook shared by lead and child runs once. Example `examples/scanned_tools.py`. See `specs/17-tool-output-scanning.md`.
|
|
14
|
+
- **Agents as tools.** `agent.as_tool(name, description, output_type=None)` lets another agent delegate to it. Every call is a fresh child run (own memory and audit chain) that keeps the child's provider, tools, and hooks and inherits the calling run's hooks (run after the child's, so delegation can't bypass a `deny_tools`), approver, run store, and remaining `max_run_cost_usd`. A child suspended on an approval suspends the parent; its approvals appear in `pending_approvals` as `"<call>/<child call>"` and `parent.resume(run_id, approvals=...)` routes them down. Child spend counts toward the parent cap and `total_cost_usd`; the parent's `tool_call` audit event records `delegated_run_id` and `delegated_root_hash`; child runs report to Cloud with `parent_run_id` on `run_start`. Crashed delegations resume the child from its checkpoint. `AgentConfig(max_delegation_depth=5)`. `ToolResult` gains `cost_usd` / `tokens`; `PendingApproval` gains `run_id`. With `cloud` set, a caller-supplied `run_id` longer than 36 characters raises `ValueError`. Example `examples/delegation.py`. See `specs/16-agent-as-tool.md`.
|
|
15
|
+
- **Durable runs.** `AgentConfig(run_store=SQLiteRunStore("runs.db"))` checkpoints every run at turn boundaries; `agent.resume(run_id)` / `resume_stream()` continue after a crash, failure, or kill. `approver=SUSPEND` parks approvals instead of awaiting them inline: `run()` returns `AgentResult(status="suspended", pending_approvals=[...])` and `agent.resume(run_id, approvals={call_id: True})` answers them later from any process. Tools interrupted mid-execution re-run only when `idempotent=True`; others are reported to the model as interrupted. Checkpoint writes are compare-and-swap (`RunConflictError`), so concurrent resumes can't execute a tool twice. Memory, turns, run cost, and the audit chain (`AuditChain.restore`) carry across; new audit events `run_suspended`, `run_resumed`, `tool_interrupted`. `run(..., run_id=...)` sets the run id; `AgentResult` gains `run_id`, `status`, `pending_approvals`. Example `examples/durable_approval.py`. See `specs/15-durable-runs.md`.
|
|
16
|
+
- **Context management.** Anthropic prompt caching is on by default (system-prompt breakpoint + automatic conversation caching; `AgentConfig(prompt_caching=False)` opts out). `AgentConfig(thinking=..., effort=...)` set Anthropic thinking and `output_config.effort` (OpenAI/Ollama `reasoning_effort`); `provider_options={...}` is merged into every request. Opt-in server-side context management: `Compaction(...)` (summarisation, beta `compact-2026-01-12`) and `ClearToolResults(...)` (beta `context-management-2025-06-27`), with compaction cost counted across `usage.iterations` and audit events `context_compacted` / `context_edited`. History is trimmed by tokens: `context_budget_tokens` (default 150K) cuts the oldest turns once to half the budget at a tool-safe boundary, keeping the prompt prefix stable between cuts; audited as `context_trimmed`. `Message.native_content` preserves provider blocks; `SQLiteMemory` persists them. Stores gain `trim_oldest()`. Example `examples/long_running_agent.py`. See `specs/14-context-management.md`.
|
|
17
|
+
- **Typed results.** `await agent.run(prompt, output_type=Model)` returns `AgentResult[Model]` with a validated `.parsed` — any type Pydantic validates (models, dataclasses, `TypedDict`, lists, enums, unions). Anthropic (`output_config.format`) and OpenAI / Ollama (`response_format`) constrain the answer natively; other providers, schemas strict mode can't express (open dicts, recursion), and Ollama runs with tools get the schema in the system prompt. Invalid answers are sent back with the validation errors up to `AgentConfig(output_retries=2)` times, then `OutputValidationError` is raised; failures are audited as `output_validation_failed`. Providers accept `output_schema` and declare `supports_structured_output`. Example `examples/typed_output.py`. See `specs/13-typed-results.md`.
|
|
18
|
+
- **MCP tools.** `async with MCPToolset(stdio(...), http(...)) as mcp:` connects Model Context Protocol servers over stdio or streamable HTTP and exposes their tools as ordinary agent-kit tools (`server__tool`), so allowlists, hooks, approvals, budgets, and audit apply. `require_approval_unless_read_only(mcp)` gates tools not marked read-only. New extra `agent-kit[mcp]` (`mcp>=2.0`); example `examples/mcp_tools.py`. See `specs/12-mcp-client.md`.
|
|
19
|
+
- **Hooks and approval gates.** `AgentConfig(hooks=Hooks(before_tool=[...], after_tool=[...], before_llm=[...]), approver=..., approval_timeout_s=...)`. Hooks return allow / deny / ask / replace: deny tools (the model sees a tool error, or `stop_run=True` raises `RunStoppedByHookError`), require human approval through an async approver with a timeout, redact or block tool output before it reaches memory or the model, and stop runs before a model call. Fail-closed throughout; every decision is audited. Helpers `require_approval`, `deny_tools`, `allow_only`; example `examples/approval_gate.py`. See `specs/11-hooks-approval-gates.md`.
|
|
20
|
+
- **Compliance exports.** `GET /v1/compliance/export` returns an Ed25519-signed evidence bundle of audit chains for a period — runs, every chain link, export-time verification, retention policy, legal holds, and deletion receipts — that `agent-kit verify` (new `agent-kit[compliance]` extra and `agent-kit` CLI) checks offline against keys published at `/.well-known/agentkit-signing-keys`. Audit retention follows the tier (7 / 90 / 365 days; enterprise configurable to 7 years); legal holds block purges; every purged run leaves a signed deletion receipt. Server signs with `AGENTKIT_SIGNING_KEY` when set. Migration `007`; the server gains a `cryptography` dependency. See `specs/10-compliance-exports.md`.
|
|
21
|
+
- **Cost circuit breaker.** `AgentConfig(max_run_cost_usd=...)` stops a run before the model call after its spend reaches the cap. `AgentConfig(enforce_budgets=True)` enforces fleet budgets — daily / weekly / monthly UTC ceilings per agent, project, or org, managed at `/v1/budgets` — raising `BudgetExceededError` before the next model call. Spend includes in-flight runs; `budget_exceeded` alert rules fire on trip and resolve on reset or a raised limit. Claude Agent SDK (`ClaudeAgentObserver(..., enforce_budgets=True)`) and OpenAI Agents SDK (`AgentKitRunHooks`) agents can be stopped too. Migration `006` adds `budgets`. See `specs/09-cost-circuit-breaker.md`.
|
|
22
|
+
- **OTLP trace ingest (`POST /v1/traces`).** Any OpenTelemetry-instrumented agent — GenAI semantic conventions or OpenInference, any language — reports runs, tool calls, tokens, cost, and failures to agent-kit Cloud with a standard OTLP/HTTP exporter. Audit chains are built at ingest and flagged `chain_origin: "ingest"` (the runs API now returns `chain_origin` for every run); span content is never stored. Migration `005` adds `audit_runs.chain_origin`, `active_run_cache.last_event_at`, and `active_run_cache.failure_message`; the server gains an `opentelemetry-proto` dependency.
|
|
23
|
+
- **Harness adapters for agent-kit Cloud.** `agent_kit.integrations.claude_agent_sdk.ClaudeAgentObserver` and `agent_kit.integrations.openai_agents.AgentKitTraceProcessor` report Claude Agent SDK and OpenAI Agents SDK runs — turns, tool calls, subagents, handoffs, guardrails, and cost — to the existing server, with the audit chain built client-side. Claude runs use the SDK's reported cost; OpenAI runs are priced from agent-kit's tables. New extras: `claude-agent-sdk`, `openai-agents`. See `specs/07-harness-adapters.md`.
|
|
24
|
+
- `CloudReporter.submit_threadsafe(event)` for synchronous callers on any thread, plus `CloudReporter.project` / `agent_name`.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- `AgentConfig.memory_window`, `InMemoryStore(window=)`, and `SQLiteMemory(window=)` default to `None` (no message cap); agents trim by `context_budget_tokens` instead. Pass a window explicitly to keep a message cap.
|
|
28
|
+
- Anthropic agent runs send the system prompt as a cached text block plus top-level `cache_control`.
|
|
29
|
+
- Minimum versions: `anthropic>=1.0`, `openai>=1.40` (structured output parameters).
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
- The `ollama` extra installed nothing, but `OllamaProvider` needs the `openai` package; `agent-kit-ai[ollama]` now installs `openai>=1.40`.
|
|
33
|
+
- `AgentResult.total_cost_usd` / `total_tokens` included every earlier run on the same `Agent`; they now cover only the run's own turns.
|
|
34
|
+
- Anthropic thinking blocks were dropped from conversation history, which breaks tool-using turns on models that think (Claude Opus 5 and Sonnet 5 do by default); assistant turns now round-trip every content block verbatim.
|
|
35
|
+
- The 50-message memory window rewrote the start of the history on every turn once exceeded, so prompt caching missed from then on (and replayed thinking blocks fail the Claude Fable 5.1 conversation check).
|
|
36
|
+
- A tool that returned `None` was reported to the model as `Error: None`; it is now sent as `null`, and only real tool errors are marked as errors.
|
|
37
|
+
|
|
38
|
+
## [0.3.0] — 2026-09-13
|
|
39
|
+
|
|
40
|
+
Tool-using agents work end to end. In 0.2.0 every agent that called a tool failed on the following
|
|
41
|
+
turn with a provider 400 — upgrade if you use tools.
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
- `Agent.stream()` now runs the full agent loop — tools execute between turns, and retry, circuit breaking, audit, and cloud reporting apply. The finished `AgentResult` is available as `agent.last_result` (also set by `run()`). Provider `stream()` accepts `tools` and may yield a final `Turn` after its text chunks; text-only providers keep working.
|
|
45
|
+
- Tool calls within one turn run concurrently; synchronous tools run in a worker thread instead of blocking the event loop.
|
|
46
|
+
- `CostSummary.cache_read_tokens` / `cache_write_tokens`; Anthropic cost includes cache reads and writes.
|
|
47
|
+
- `specs/06-harness-roadmap.md` — the plan for closing harness gaps (fundamentals, parity, differentiators).
|
|
48
|
+
- **SMTP delivery for email alert channels.** Configure with `SMTP_HOST`, `SMTP_PORT`, `SMTP_SECURITY` (`starttls`/`ssl`/`none`), `SMTP_USERNAME`, `SMTP_PASSWORD`, `SMTP_FROM`. Without `SMTP_HOST`, email notifications are logged as before. Previously email channels never sent mail.
|
|
49
|
+
- `agent_kit/py.typed` — the package now advertises its inline type hints to downstream type checkers (PEP 561).
|
|
50
|
+
- GitHub Actions CI (`.github/workflows/ci.yml`) — ruff, mypy, and pytest for the SDK on Python 3.11/3.12; ruff, pytest, and an Alembic `upgrade head` smoke test for the cloud server.
|
|
51
|
+
- `CONTRIBUTING.md`, `CHANGELOG.md`, and `examples/README.md`.
|
|
52
|
+
- `docs/api-reference.md` now documents `GET /v1/audit/runs/{run_id}/export` and `GET /v1/audit/events`.
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
- The source distribution is limited to the SDK (`agent_kit/`, `tests/`, `examples/`, README, LICENSE, CHANGELOG); it previously swept in `server/` and untracked local files.
|
|
56
|
+
- Relicensed from FSL-1.1-Apache-2.0 to the **Rising Sun License v1.0** — free for personal, educational, and research use; commercial deployments connect to the Nous network.
|
|
57
|
+
- `PROJECT_INDEX.json` now covers the cloud server (13 modules, server tests, server dependencies) alongside the SDK.
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
- **Multi-turn tool use failed on Anthropic and OpenAI.** Assistant tool calls were not stored in history, so the request after a tool call carried an empty assistant turn and orphaned tool results, which both APIs reject. `Message.tool_calls` now round-trips through both adapters (and Ollama) and `SQLiteMemory` (existing databases migrate automatically); parallel tool results share one message and failed tools set `is_error`.
|
|
61
|
+
- Memory windows could split a tool call from its results; trimming now keeps tool exchanges intact.
|
|
62
|
+
- Cost tracking reported $0 for Claude Opus 5, Sonnet 5, and Fable; billed Opus 4.5–4.8 at 3× actual; understated Haiku 4.5; priced `gpt-4o-mini` as `gpt-4o`. Prices now use longest-prefix matching, and unknown models log a warning.
|
|
63
|
+
- `BaseProvider.stream()` was declared `async def` while every implementation is an async generator, so `Agent.stream()` failed type checking. The annotation now matches the runtime contract. No behaviour change — streaming worked correctly at runtime.
|
|
64
|
+
- `AgentLoop.run()` bound one local name to both a `ToolResult` and an `AgentResult`; the tool-call result is now `tool_result`.
|
|
65
|
+
- `docs/self-hosting.md` was not runnable: it installed from a nonexistent `requirements.txt` (the Dockerfile failed at `COPY`), listed `SECRET_KEY` and `LOG_LEVEL` env vars the server never reads, the seed script omitted the required `ApiKey.key_prefix`, and the Docker image baked `ENABLE_ALERT_WORKER=1` into a `--workers 4` process (duplicate alert evaluations).
|
|
66
|
+
- `docs/troubleshooting.md` referenced a nonexistent `AGENTKIT_LOG_LEVEL` variable; it now shows how to enable the `agent_kit.cloud` debug logger.
|
|
67
|
+
- `docs/api-reference.md` documented the PagerDuty channel key as `integration_key`, but dispatch read `routing_key`, so channels created from the docs never paged. The docs now say `routing_key`, and dispatch also accepts `integration_key` so existing channels start working.
|
|
68
|
+
- `docs/api-reference.md` now documents `GET /healthz`.
|
|
69
|
+
- The server test suite never exited: aiosqlite ≥ 0.22 uses non-daemon worker threads and the shared test engine was never disposed, so `pytest` hung after the last test (and would hang the CI server job).
|
|
70
|
+
- `OpenAIProvider.stream()` failed `mypy --strict` against openai 2.x (`**kwargs` defeated the `stream=True` overload). No behaviour change.
|
|
71
|
+
- `server/agentkit_cloud.db` (an empty dev database) is no longer tracked; `*.db` is gitignored.
|
|
72
|
+
- Restored a clean lint and type baseline: 18 ruff findings in the SDK, 13 in the server, and 10 mypy errors — dead locals, unused imports, bare `Callable` annotations, and a mid-module `import` in `types.py`.
|
|
73
|
+
|
|
74
|
+
## [0.2.0] — 2026
|
|
75
|
+
|
|
76
|
+
### Added
|
|
77
|
+
- **agent-kit Cloud** — an ingest + observability backend (`server/`, FastAPI + SQLAlchemy + Alembic):
|
|
78
|
+
- Spec 01: hosted, tamper-evident audit trail with server-side Merkle chain verification and JSONL/CSV export.
|
|
79
|
+
- Spec 02: fleet dashboard metrics API (`/summary`, `/cost`, `/runs`, `/agents`, `/circuit-breaker`, `/active`).
|
|
80
|
+
- Spec 03: alerting — rules, channels (email/Slack/PagerDuty/webhook), background evaluator, ack workflow.
|
|
81
|
+
- Spec 04: SLA-backed support context API and tier management.
|
|
82
|
+
- `CloudReporter` — batched, gzip-compressed, fire-and-forget lifecycle event shipping from the SDK.
|
|
83
|
+
- `DAGOrchestrator` — parallel multi-agent execution with cycle detection.
|
|
84
|
+
- `SQLiteMemory` — persistent, thread-safe conversation memory.
|
|
85
|
+
- Circuit breaker state transitions are recorded in the audit chain.
|
|
86
|
+
|
|
87
|
+
## [0.1.0]
|
|
88
|
+
|
|
89
|
+
### Added
|
|
90
|
+
- Initial release: `Agent`, `AgentConfig`, the `@tool` decorator with JSON Schema generation, `ToolRegistry` allowlist enforcement, Anthropic/OpenAI/Ollama providers, `LinearPipeline`, `RetryPolicy`, `CircuitBreaker`, the `AuditChain` Merkle log, and `AgentTracer` (noop/console/OTLP).
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Rising Sun License v1.0
|
|
2
|
+
|
|
3
|
+
This license governs all software released under the Rising Sun project.
|
|
4
|
+
|
|
5
|
+
## For People
|
|
6
|
+
|
|
7
|
+
Use this software however you want. Run it, study it, modify it, share it.
|
|
8
|
+
Personal use, education, research, tinkering — all free, no strings attached.
|
|
9
|
+
|
|
10
|
+
You don't need permission. You don't need to register. Just use it.
|
|
11
|
+
|
|
12
|
+
## For Builders
|
|
13
|
+
|
|
14
|
+
If you build something that generates revenue using this software, connect it
|
|
15
|
+
to the Nous network. Nous handles verification, attestation, and accounting
|
|
16
|
+
automatically — you integrate once and it works.
|
|
17
|
+
|
|
18
|
+
The economics are simple: Nous takes a small percentage of the value flowing
|
|
19
|
+
through your deployment. The rate is published and predictable. You always
|
|
20
|
+
keep the majority. The exact terms are governed by the Nous protocol and
|
|
21
|
+
published at the canonical terms endpoint.
|
|
22
|
+
|
|
23
|
+
You may not remove, bypass, or substitute the Nous integration in a
|
|
24
|
+
commercial deployment. Everything else is yours to build.
|
|
25
|
+
|
|
26
|
+
## For Enterprise
|
|
27
|
+
|
|
28
|
+
Custom integration, dedicated support, and private deployment are available
|
|
29
|
+
directly from Rising Sun. Enterprise terms are negotiated individually and
|
|
30
|
+
may include modified Nous configurations, SLAs, and priority access to new
|
|
31
|
+
capabilities.
|
|
32
|
+
|
|
33
|
+
Contact: alex@risingsun.name
|
|
34
|
+
|
|
35
|
+
## How Nous Works
|
|
36
|
+
|
|
37
|
+
Nous is a verification and attestation service. When your deployment does
|
|
38
|
+
work — processes data, serves users, executes transactions — Nous verifies
|
|
39
|
+
the work, attests to its completion, and routes value through the Ergon
|
|
40
|
+
ledger. Trust scores build over time: consistent, honest operation earns
|
|
41
|
+
better terms automatically.
|
|
42
|
+
|
|
43
|
+
This is not a phone-home or surveillance mechanism. Nous verifies value
|
|
44
|
+
created, not behavior observed. The attestation record is transparent
|
|
45
|
+
and auditable.
|
|
46
|
+
|
|
47
|
+
## What You Can Do
|
|
48
|
+
|
|
49
|
+
- Use, copy, modify, and distribute this software
|
|
50
|
+
- Build commercial products and services on it
|
|
51
|
+
- Fork it, extend it, combine it with other software
|
|
52
|
+
- Run it on any infrastructure you control
|
|
53
|
+
- Contribute improvements back (appreciated, not required)
|
|
54
|
+
|
|
55
|
+
## What You Cannot Do
|
|
56
|
+
|
|
57
|
+
- Remove or bypass Nous integration in commercial deployments
|
|
58
|
+
- Represent modified versions as official Rising Sun releases
|
|
59
|
+
- Use Rising Sun trademarks without permission
|
|
60
|
+
|
|
61
|
+
## Contributions
|
|
62
|
+
|
|
63
|
+
Contributions via pull request grant the project a perpetual, irrevocable,
|
|
64
|
+
royalty-free license to use the contribution. Contributors retain copyright
|
|
65
|
+
on their work.
|
|
66
|
+
|
|
67
|
+
## No Warranty
|
|
68
|
+
|
|
69
|
+
This software is provided as-is, without warranty of any kind. The licensor
|
|
70
|
+
is not liable for any damages arising from its use.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
Rising Sun License v1.0
|
|
75
|
+
Copyright (c) 2026 Alex Macaluso
|
|
76
|
+
https://risingsun.name
|