Open Source Agent Framework

Diana Deep Agents

The open source agent-agnostic programming CLI.
Create specialized agents with custom rules for each project.

Clone the repo and start building agents
Source code, documentation, and examples — everything you need to get started.
Download on GitHub
Coming soon One-line installers for macOS, Windows, and Linux
Designed for autonomous coding agents

Agents are taking on increasingly complex coding work — multi-file refactors, full-stack features, test suites, infrastructure. Diana Deep Agents is built for the kind of work that takes hours, not seconds.

Break down complex objectives

The built-in PlanTool lets agents decompose tasks into steps, track progress, and adapt as they learn about your codebase. Plans persist across turns — agents don't lose context.

Delegate work to specialized agents

The TaskTool spawns sub-agents for independent subtasks — each with isolated context, dedicated tools, and custom rules. A backend agent and a frontend agent can work in parallel.

9 built-in agent profiles

Pre-configured agents for C#, Blazor, React, Python, API development, EF Core, testing, code review, and CSS — each with curated system prompts and tool sets. Or define your own via YAML.

Native context management

Context management is critical for long-running agents, and hard to get right. Diana Deep Agents ships with 8 production middleware that handle it automatically — so your agents stay fast, cheap, and focused even on large codebases.

HistoryCompression Compresses conversation history. Keeps 16 recent messages in full, truncates older ones. Saves 30-60% tokens on long sessions.
SmartToolFilter Reduces tool definitions per turn from 20+ to ~8 based on context keywords. Saves ~2,000 tokens per turn.
AntiLoop Caches results of read-only tools. Prevents agents from calling the same tool with the same args twice.
CostTracking Tracks cumulative token usage and estimated cost. Budget warnings at configurable thresholds.
Escalation Auto-switches to a stronger model after consecutive errors. De-escalates on success. Keyword-triggered for complex tasks.
ProgressTracking Injects progress summaries so agents know what they've done. Warns at 70% and 90% of turn limits.
Retry Exponential backoff for transient failures — timeouts, rate limits, 503s. 3 retries with progressive delays.
HumanInTheLoop Audit logging for destructive operations. Configurable approval for write_file, edit_file, and shell commands.
Model neutral with MCP extensibility

Diana Deep Agents is a batteries-included, general purpose agent framework. Use any model provider, extend with MCP servers, and define agent behavior through configuration — not code.

Any LLM Provider

Anthropic (Claude), OpenAI (GPT), Kimi, or any compatible API. Automatic model escalation when tasks get hard.

MCP Protocol

Extend with Model Context Protocol servers. Specialized .NET MCP included. Add MCPs for databases, APIs, cloud providers, or any custom tooling.

YAML Agent Definitions

Define agent profiles, system prompts, tool access, and cost policies in YAML. No code changes — just configuration.

Security Built In

Lateral movement validation, file whitelist/blacklist, path traversal detection. Agents can't escape the project directory.

Semantic Search

On-device ONNX embeddings with SQLite vector store. Agents search your codebase by meaning, not just text. Runs 100% locally.

11+ Built-in Tools

File ops, shell execution, web search, web fetch, grep, glob — everything an agent needs to navigate and modify a codebase.

Code with Diana Deep Agents

Available as an SDK and CLI. Use it in your codebase or run it directly in your terminal. Define agents, give them work, and watch the swarm build.

diana — ~/my-project
# Install Diana Deep Agents
$ curl -fsSL https://diana.tools/install.sh | bash

# Initialize — works with any project
$ diana
✓ Indexed 312 files into vector store
✓ Loaded 3 agent profiles from .diana/agents.yaml
✓ Connected: claude-sonnet-4-6 (anthropic)

# Agents decompose, delegate, and build
> Add user authentication with JWT, login page, and tests
PlanTool creating 6-step implementation plan...
TaskTool spawning agent api-dev → JWT middleware + auth routes
TaskTool spawning agent react-dev → login/register components
TaskTool spawning agent test-writer → integration test suite
api-dev ✓ authMiddleware.js, authRoutes.js, userModel.js
react-dev ✓ LoginPage.tsx, AuthContext.tsx, useAuth.ts
test-writer ✓ auth.test.js (12 cases, 3 edge cases)
✓ Plan complete: 9 files created, 3 agents, 847 tokens/agent avg
9 built-in agents, or define your own

Each agent comes with a curated system prompt, restricted tool access, and cost policies. Use them out of the box or as templates for your own agents.

csharp-expert C# · .NET · SOLID · DI
react-dev React · TypeScript · Hooks · CSS Modules
python-dev Python · FastAPI · Django · PEP 8
api-dev REST · WebAPI · Endpoints · Validation
test-writer xUnit · Jest · TDD · Edge Cases
code-reviewer Quality · Security · Bugs · Best Practices
blazor-dev Blazor · WASM · Razor · Components
ef-core-dev EF Core · Migrations · SQL · ORM
css-guardian CSS · Isolation · BEM · Design Systems
.diana/agents.yaml
- name: my-backend-agent
description: Express + PostgreSQL specialist
systemPrompt: |
You are a backend agent specialized in Express.js
and PostgreSQL. Follow REST conventions. Always
include input validation and error handling.
tools:
- read_file
- write_file
- edit_file
- run_command
- grep
maxIterations: 15
Alpha

Diana Deep Agents is in active development. Always use version control and review generated output before committing. We're building in the open — expect rough edges and rapid iteration.

Frequently asked questions

What is Diana Deep Agents?

An open source agent framework — a batteries-included CLI that comes with built-in tools, middleware, and agent profiles for complex, long-running coding tasks. Think of it as an agent harness: you define the agents, it handles the orchestration.

Is it only for .NET?

No. Diana Deep Agents is fully language-agnostic. The built-in agents cover C#, React, Python, and more — and you can define custom agents for any stack. .NET has a specialized MCP server for deeper integration, but the core framework works with anything.

What LLM providers are supported?

Anthropic (Claude), OpenAI (GPT), and Kimi out of the box. The framework includes automatic model escalation — start with a fast model, auto-switch to a stronger one when the agent hits consecutive errors or complex planning tasks.

How do agent swarms work?

When an agent receives a complex task, it uses the PlanTool to break it into steps, then the TaskTool to spawn specialized sub-agents for each step. Each sub-agent runs in isolated context with its own tools, rules, and conversation. Results are coordinated back to the parent agent.

What about cost control?

Built-in CostTracking middleware estimates spend in real time. SmartToolFilter saves ~2,000 tokens per turn. HistoryCompression saves 30-60% on long conversations. AntiLoop prevents redundant tool calls. You can also set token budgets and max iteration limits per agent.

Can I use it as an SDK?

Yes. Diana is available as a .NET library with a builder pattern API. Create agents programmatically, add custom tools and middleware, and integrate into your existing applications via dependency injection.

Start building with Diana Deep Agents

Open source. Free forever. Bring your own API key.

Copied to clipboard ✓