-
✅ BaseAgent - Abstract base for all agents
- Sub-agent hierarchy (
ParentAgent,SubAgents) FindAgent(name)- recursive searchRunAsync()- async event stream execution
- Sub-agent hierarchy (
-
✅ LlmAgent - Full-featured LLM agent
- ✅
Instruction- System instruction with template support - ✅
{var}template substitution from session state - ✅
{var?}optional template variables - ✅
OutputKey- Auto-save response to state - ✅
Tools- Function calling support - ✅
Model- LLM model identifier - ✅
SubAgents- Multi-agent delegation - ✅
InputSchema/OutputSchema- Structured I/O - ✅
Callbacks- Lifecycle hooks (before/after model, tool start/end) - ✅
ToolProviders- Dynamic context-aware tool injection - ✅
RequestProcessors- Request transformation pipeline with priority
- ✅
-
✅ SequentialAgent - Execute agents in sequence
- Passes same
InvocationContextto all - State sharing via
session.state - Supports escalation (early termination)
- Passes same
-
✅ ParallelAgent - Execute agents concurrently
- Each agent gets branched context (
ParentBranch.ChildName) - Events interleaved from all agents
- Shared state access (use distinct keys!)
- Each agent gets branched context (
-
✅ LoopAgent - Loop execution with conditions
MaxIterations- limit loop count- Escalation support (break on
escalate=True) - State persists across iterations
-
✅ FunctionTool - Wrap C# functions as tools
- Auto-generate schema from method signature
- Support for
Func<>,Func<Task<>> - 1-4 parameters supported
- Auto parameter type conversion
- Special parameters:
IToolContext,CancellationToken
-
✅ ITool interface - Port for all tools
GetDeclaration()- JSON schema for LLMExecuteAsync()- Execute with args
-
✅ IToolProvider - Dynamic tool injection
GetTools()- Provide tools based on invocation context- Context-aware tool selection
- Runtime tool composition
- ✅ IAgentCallbacks - Lifecycle hooks
BeforeModelAsync()- Intercept before LLM call, can skip LLMAfterModelAsync()- Intercept after LLM response, can replace responseOnToolStartAsync()- Hook before tool executionOnToolEndAsync()- Hook after tool completionICallbackContext- Access to session, state, metadata
- ✅ IRequestProcessor - Request transformation pipeline
ProcessAsync()- Transform LLM request before executionPriority- Control execution order (lower runs first)- Can modify system instructions, tools, conversation history
- Supports multiple processors with ordered execution
-
✅ Event - Core event DTO
Author- Event sourceContent- Parts (text, function calls, responses)Actions- EventActions (escalate, transfer)Metadata- Additional data
-
✅ Content - Multi-part content container
Role- user, model, system, toolParts- List of content parts
-
✅ Part - Content part (text, function call, etc.)
Text- Text contentFunctionCall- LLM function callFunctionResponse- Tool execution resultInlineData- Binary data (images, etc.)
-
✅ EventActions - Actions triggered by events
Escalate- Stop workflow, propagate to parentTransferTo- Agent delegation target
-
✅ ISession - Session management port
SessionId- Unique identifierState- Key-value state storeHistory- Message historyMemory- Long-term memory (optional)
-
✅ InMemorySession - In-memory implementation
- Thread-safe state access (
ConcurrentDictionary) - Generic
Get<T>()/Set<T>()methods - Message history tracking
- Thread-safe state access (
-
✅ InvocationContext - Execution context
Session- Current sessionBranch- Hierarchy path (for ParallelAgent)UserInput- User messageWithBranch()/WithUserInput()- Immutable updates
-
✅ ILlm - LLM provider port
GenerateAsync()- Single completionGenerateStreamAsync()- Streaming completion
-
✅ MockLlm - Mock implementation for testing
- Echo responses
- Useful for unit tests and demos
- ✅ Runner - Main entry point
RunAsync()- Execute agent, return final textRunStreamAsync()- Stream events- Session management
- Sliding window compaction support
-
✅ GeminiLlm - Google Gemini API integration
- Full Gemini 2.0 Flash support
- Streaming and non-streaming modes
- Function calling support
-
✅ OpenAILlm - OpenAI and compatible endpoints
- GPT-4, GPT-3.5 support
- Custom endpoint configuration for local models
- Ollama, LocalAI, vLLM, LM Studio compatible
-
✅ MockLlm - Testing and development
- Echo responses
- Predictable behavior for unit tests
-
✅ PlanReActPlanner - Structured reasoning with tags
- PLANNING, REASONING, ACTION tags
- REPLANNING, FINAL_ANSWER support
- Multi-step LLM-guided planning
- ParseResponse() for structured output
-
✅ BuiltInPlanner - Native model thinking
- Gemini 2.0 Thinking mode
- Extended thinking capabilities
- Model-native reasoning
-
✅ GoogleSearchTool - Web search integration
- Google Custom Search JSON API
- Configurable result count
- Full error handling
-
✅ CodeExecutionTool - C# code execution
- dotnet-script integration
- Console app compilation fallback
- Timeout and security controls
-
✅ AgenticFilesRetrievalTool - LLM-powered retrieval
- grep + LLM approach (beats vector embeddings)
- LLM-powered query expansion
- Multi-pass grep searches
- LLM-based relevance ranking
- Superior semantic search without embeddings
-
✅ FilesRetrievalTool - Basic file retrieval
- Keyword-based file search
- Directory scanning
- Pattern matching
-
✅ OpenAPIToolset - OpenAPI 3.0 parser
- Full spec parser (JSON/YAML)
- Auto-generate RestApiTool from operations
- Authentication support (AuthScheme, AuthCredential)
- Parameter schema conversion
- Request/response mapping
-
✅ RestApiTool - HTTP REST API execution
- Dynamic HTTP method support
- Request body serialization
- Response parsing
-
✅ McpToolset - Model Context Protocol integration
- Stdio transport support
- SSE (Server-Sent Events) transport
- HTTP transport
- Tool filtering and name prefixing
- Async connection management
-
✅ McpTool - MCP tool wrapper
- Schema conversion
- Argument mapping
-
✅ McpSchemaConverter - Schema translation
- MCP → ADK schema conversion
- Type mapping
-
✅ InMemoryMemoryService - Semantic memory search
- AddSessionToMemoryAsync() - Ingest conversations
- SearchMemoryAsync() - Keyword-based semantic search
- Cross-session memory retrieval
-
✅ DatabaseSessionService - Persistent sessions
- PostgreSQL support
- MySQL support
- SQLite support
- Auto schema initialization
- Multi-database compatibility (Dapper)
-
✅ FileArtifactService - Disk-based artifacts
- Persistent file storage
- Version management
- MIME type tracking
-
✅ InMemoryArtifactService - In-memory artifacts
- Thread-safe concurrent storage
- Metadata support
-
✅ CompactionService - Sliding window compaction
- LLM-based event summarization
- Sliding window algorithm
- CompactionInterval and OverlapSize config
- Automatic history management
-
✅ LlmEventSummarizer - LLM-powered summarization
- Converts event streams to summaries
- Preserves context
- Reduces token usage
- ✅ A2A (Agent-to-Agent) Communication
- Remote agent invocation
- Event streaming across network
- gRPC-based transport
- Serialization support
-
✅ A.D.D V3 Five-Layer Pattern
- ✅ Boundary - Pure DTOs (Event, Content, etc.)
- ✅ CoreAbstractions - Ports (IAgent, ILlm, ITool)
- ✅ Implementations - Adapters (InMemorySession, MockLlm)
- ✅ Operators - Business Logic (BaseAgent, LlmAgent, Workflows)
- ✅ Bootstrap - Composition Root (Runner, DI)
-
✅ Dependency Rules Enforced
- Bootstrap → All layers
- Operators → CoreAbstractions + Boundary
- Implementations → CoreAbstractions + Boundary
- CoreAbstractions → NONE
- Boundary → NONE
-
✅ HelloWorldAgent - Basic agent demo
- Simple LlmAgent
- MockLlm adapter
- Runner execution
-
✅ StoryFlowAgent - Multi-agent workflow
- Custom BaseAgent orchestrator
- LoopAgent (Critic → Reviser, 2 iterations)
- SequentialAgent (Grammar → Tone checks)
- 5 LlmAgents
- State passing (
output_key) - Conditional logic (tone-based regeneration)
-
⏳ Structured Output Validation
- Pydantic-like schema validation
output_schemaenforcement with retry
-
⏳ ASP.NET Core Integration Templates
- Minimal APIs for agents
- WebSocket streaming templates
- SSE (Server-Sent Events) helpers
-
⏳ Evaluation Framework
- Agent performance testing
- Metrics collection
- Benchmarking tools
-
⏳ CLI Tool
dotnet tool install ntg-adk- Project scaffolding
- Agent evaluation commands
-
⏳ Additional Built-in Tools
- Web Page Loader
- File system operations
- Database query tools
See COMPATIBILITY.md for detailed breakdown
| Feature | Python ADK | NTG.Adk C# | Status |
|---|---|---|---|
| BaseAgent | ✅ | ✅ | Complete |
| LlmAgent | ✅ | ✅ | Complete (with callbacks, tool providers, request processors) |
| SequentialAgent | ✅ | ✅ | Complete |
| ParallelAgent | ✅ | ✅ | Complete |
| LoopAgent | ✅ | ✅ | Complete |
| FunctionTool | ✅ | ✅ | Complete (nested objects, enums, arrays) |
| Session State | ✅ | ✅ | Complete |
| InvocationContext | ✅ | ✅ | Complete |
| Event System | ✅ | ✅ | Complete |
| Instruction Templates | ✅ | ✅ | Complete |
| Output Key | ✅ | ✅ | Complete |
| Sub-agents | ✅ | ✅ | Complete |
| Escalation | ✅ | ✅ | Complete |
| Gemini LLM | ✅ | ✅ | Complete |
| OpenAI LLM | ✅ | ✅ | Complete |
| AutoFlow | ✅ | ✅ | Complete |
| Built-in Tools | ✅ | ✅ | Complete (Google Search, Code Execution) |
| Memory Services | ✅ | ✅ | Complete (Semantic search, cross-session) |
| A2A Protocol | ✅ | ✅ | Complete |
| Callbacks | ✅ | ✅ | Complete (LLM & Tool hooks) |
| Planners | ✅ | ✅ | Complete (PlanReAct, BuiltIn) |
| Database Persistence | ❌ | ✅ | C# Exclusive (PostgreSQL, MySQL, SQLite) |
| MCP Protocol | ❌ | ✅ | C# Exclusive |
| OpenAPI Toolset | ✅ | C# Enhanced (Full 3.0 parser) | |
| Agentic Retrieval | ❌ | ✅ | C# Exclusive (grep + LLM) |
| Request Processors | ❌ | ✅ | C# Exclusive |
| Tool Providers | ❌ | ✅ | C# Exclusive |
| Sliding Window Compaction | ✅ | ✅ | Complete |
Compatibility Scores:
- API Surface Compatibility: 100% (usage patterns match)
- Feature Parity: 99% (core features complete)
- Core Agents: 100% (all agent types complete)
- Production Readiness: 100% (Gemini, OpenAI, all tools ready)
→ See COMPATIBILITY.md for full analysis
API-Compatible:
# Python
agent = LlmAgent(
name="MyAgent",
model="gemini-2.5-flash",
instruction="You are helpful",
output_key="result"
)// C# - Same API
var agent = new LlmAgent(llm, "gemini-2.5-flash")
{
Name = "MyAgent",
Instruction = "You are helpful",
OutputKey = "result"
};Workflow-Compatible:
# Python
pipeline = SequentialAgent(
name="Pipeline",
sub_agents=[agent1, agent2]
)// C# - Same pattern
var pipeline = new SequentialAgent(
"Pipeline",
[agent1, agent2]
);- Type Safety: Compile-time errors vs runtime crashes
- Performance: 5-10x faster than Python
- IDE Support: Best-in-class IntelliSense
- Testability: Mock ports easily
- Maintainability: Clear layer separation
- Enterprise-Ready: Familiar to .NET developers
README.md- Quick start & overviewARCHITECTURE.md- A.D.D V3 deep diveGETTING_STARTED.md- Tutorials & learning pathFEATURES.md- This file (complete feature list)
Last Updated: 2026-03-14 Version: 1.8.17 Python ADK Compatibility: 99% core feature parity (100% production-critical features)