# ingenimax/agent-sdk-go architecture

> Architecture diagram of the GitHub repository ingenimax/agent-sdk-go, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ingenimax/agent-sdk-go
- Repository: https://github.com/ingenimax/agent-sdk-go

## Overview

Ingenimax Agent Go SDK is a framework for building AI agents and applications, with a CLI as one entry point. The main workflow configures an agent, accepts a prompt, uses an LLM and optional tools or memory, and returns a response. Distinct capabilities include multi-agent orchestration, structured tasks, sessions and memory consolidation, MCP/A2A integrations, and evaluation. The graph follows README claims and sampled source; links among unsampled subsystems are omitted where wiring is uncertain.

Main entry points: [`pkg/agent/agent.go`](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/agent/agent.go) (Agent), [`pkg/agent/tool_pipeline.go`](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/agent/tool_pipeline.go) (Tool pipeline), [`pkg/llm/types.go`](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/llm/types.go) (LLM clients), [`pkg/memory/factory.go`](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/memory/factory.go) (Memory management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Agent runtime"]
  node_config["Configuration<br/>[config.go]"]
  node_agent["Agent<br/>[agent.go]"]
  node_pipeline["Tool pipeline<br/>[tool_pipeline.go]"]
  node_guardrails["Guardrails<br/>[guardrails.go]"]
  node_hooks["Hooks and plugins<br/>[hooks.go]"]
  node_tracing["Tracing and usage<br/>[traced_llm.go]"]
end

subgraph group_intelligence["Models and tools"]
  node_llm["LLM clients<br/>[types.go]"]
  node_providers["Provider adapters<br/>[client.go]"]
  node_tools["Tool ecosystem<br/>[registry.go]"]
  node_mcp["MCP integration<br/>[mcp.go]"]
end

subgraph group_state["Memory and state"]
  node_memory["Memory management<br/>[factory.go]"]
  node_datastore[("Datastores<br/>[postgres.go]")]
  node_sessions["Session persistence<br/>[manager.go]"]
  node_consolidation["Memory consolidation<br/>[consolidation.go]"]
end

subgraph group_composition["Agent composition"]
  node_orchestration["Multi-agent patterns<br/>[patterns.go]"]
  node_execution["Execution plans<br/>[executionplan.go]"]
  node_tasks["Structured tasks<br/>[agent_service.go]"]
  node_evaluation["Agent evaluation<br/>[runner.go]"]
end

subgraph group_interfaces["Application interfaces"]
  node_cli["Agent CLI<br/>[main.go]"]
  node_a2a["A2A server<br/>[server.go]"]
  node_grpc["gRPC interface<br/>[agent_server.go]"]
  node_microservice["HTTP and UI<br/>[http_server.go]"]
end

node_user(("User"))
node_provider_service{{"LLM providers"}}

node_user -->|"submits prompt"| node_cli
node_cli -->|"loads settings"| node_config
node_cli -->|"runs prompt"| node_agent
node_agent -->|"requests generation"| node_llm
node_llm -->|"selects adapter"| node_providers
node_providers -->|"sends requests"| node_provider_service
node_agent -->|"decorates tools"| node_pipeline
node_pipeline -.->|"applies policies"| node_guardrails
node_pipeline -.->|"intercepts calls"| node_hooks
node_llm -->|"executes tool calls"| node_tools
node_tools -.->|"uses MCP tools"| node_mcp
node_agent -.->|"uses conversation memory"| node_memory
node_memory -.->|"persists data"| node_datastore
node_agent -.->|"runs in session"| node_sessions
node_sessions -.->|"stores session state"| node_datastore
node_memory -.->|"supports consolidation"| node_consolidation
node_orchestration -->|"composes agents"| node_agent
node_execution -.->|"executes plan"| node_agent
node_tasks -.->|"delegates task"| node_agent
node_evaluation -->|"evaluates target"| node_agent
node_a2a -->|"serves agent"| node_agent
node_grpc -.->|"exposes agent"| node_agent
node_microservice -.->|"provides agent UI"| node_agent
node_agent -.->|"records activity"| node_tracing

click node_cli "https://github.com/ingenimax/agent-sdk-go/blob/main/cmd/agent-cli/main.go"
click node_config "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/config/config.go"
click node_agent "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/agent/agent.go"
click node_pipeline "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/agent/tool_pipeline.go"
click node_guardrails "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/guardrails/guardrails.go"
click node_hooks "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/hooks/hooks.go"
click node_llm "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/llm/types.go"
click node_providers "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/llm/openai/client.go"
click node_tools "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/tools/registry.go"
click node_mcp "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/mcp/mcp.go"
click node_memory "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/memory/factory.go"
click node_datastore "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/datastore/postgres/postgres.go"
click node_sessions "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/session/manager.go"
click node_consolidation "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/consolidation/consolidation.go"
click node_orchestration "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/orchestration/patterns.go"
click node_execution "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/executionplan/executionplan.go"
click node_tasks "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/task/agent_service.go"
click node_evaluation "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/eval/runner.go"
click node_a2a "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/a2a/server.go"
click node_grpc "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/grpc/server/agent_server.go"
click node_microservice "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/microservice/http_server.go"
click node_tracing "https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/tracing/traced_llm.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config,node_agent,node_pipeline,node_guardrails,node_hooks,node_tracing,node_user toneBlue
class node_llm,node_providers,node_tools,node_mcp toneAmber
class node_memory,node_datastore,node_sessions,node_consolidation toneMint
class node_orchestration,node_execution,node_tasks,node_evaluation toneRose
class node_cli,node_a2a,node_grpc,node_microservice,node_provider_service toneIndigo
```

## Components

### Agent runtime

- [Configuration](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/config/config.go): `pkg/config/config.go`
- [Agent](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/agent/agent.go): `pkg/agent/agent.go`
- [Tool pipeline](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/agent/tool_pipeline.go): `pkg/agent/tool_pipeline.go`
- [Guardrails](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/guardrails/guardrails.go): `pkg/guardrails/guardrails.go`
- [Hooks and plugins](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/hooks/hooks.go): `pkg/hooks/hooks.go`
- [Tracing and usage](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/tracing/traced_llm.go): `pkg/tracing/traced_llm.go`

### Models and tools

- [LLM clients](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/llm/types.go): `pkg/llm/types.go`
- [Provider adapters](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/llm/openai/client.go): `pkg/llm/openai/client.go`
- [Tool ecosystem](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/tools/registry.go): `pkg/tools/registry.go`
- [MCP integration](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/mcp/mcp.go): `pkg/mcp/mcp.go`

### Memory and state

- [Memory management](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/memory/factory.go): `pkg/memory/factory.go`
- [Datastores](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/datastore/postgres/postgres.go): `pkg/datastore/postgres/postgres.go`
- [Session persistence](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/session/manager.go): `pkg/session/manager.go`
- [Memory consolidation](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/consolidation/consolidation.go): `pkg/consolidation/consolidation.go`

### Agent composition

- [Multi-agent patterns](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/orchestration/patterns.go): `pkg/orchestration/patterns.go`
- [Execution plans](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/executionplan/executionplan.go): `pkg/executionplan/executionplan.go`
- [Structured tasks](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/task/agent_service.go): `pkg/task/agent_service.go`
- [Agent evaluation](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/eval/runner.go): `pkg/eval/runner.go`

### Application interfaces

- [Agent CLI](https://github.com/ingenimax/agent-sdk-go/blob/main/cmd/agent-cli/main.go): `cmd/agent-cli/main.go`
- [A2A server](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/a2a/server.go): `pkg/a2a/server.go`
- [gRPC interface](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/grpc/server/agent_server.go): `pkg/grpc/server/agent_server.go`
- [HTTP and UI](https://github.com/ingenimax/agent-sdk-go/blob/main/pkg/microservice/http_server.go): `pkg/microservice/http_server.go`

### Other components

- **User**
- **LLM providers**

## Connections

- User → Agent CLI: submits prompt
- Agent CLI → Configuration: loads settings
- Agent CLI → Agent: runs prompt
- Agent → LLM clients: requests generation
- LLM clients → Provider adapters: selects adapter
- Provider adapters → LLM providers: sends requests
- Agent → Tool pipeline: decorates tools
- Tool pipeline → Guardrails: applies policies
- Tool pipeline → Hooks and plugins: intercepts calls
- LLM clients → Tool ecosystem: executes tool calls
- Tool ecosystem → MCP integration: uses MCP tools
- Agent → Memory management: uses conversation memory
- Memory management → Datastores: persists data
- Agent → Session persistence: runs in session
- Session persistence → Datastores: stores session state
- Memory management → Memory consolidation: supports consolidation
- Multi-agent patterns → Agent: composes agents
- Execution plans → Agent: executes plan
- Structured tasks → Agent: delegates task
- Agent evaluation → Agent: evaluates target
- A2A server → Agent: serves agent
- gRPC interface → Agent: exposes agent
- HTTP and UI → Agent: provides agent UI
- Agent → Tracing and usage: records activity
