Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@ The `sgrsh` command:

For more examples and detailed usage instructions, see the [examples/](examples/) directory.

### Agent Client Protocol (`sgracp`)

Editors and tools that speak the [Agent Client Protocol](https://agentclientprotocol.com/) can run SGR agents over **stdio** (newline-delimited JSON-RPC), using the same YAML configuration as the HTTP server.

```bash
sgracp --config examples/sgr_deep_research/config.yaml
```

Optional `acp` block in `config.yaml` selects which `agents:` entry to expose (if omitted, the first agent definition is used):

```yaml
acp:
agent: sgr_agent
```

Protocol details follow the official ACP specification, the [Python SDK](https://agentclientprotocol.github.io/python-sdk/), and the `agent-client-protocol` package used by this binary.

## Benchmarking

![SimpleQA Benchmark Comparison](https://github.com/vamplabAI/sgr-agent-core/blob/main/docs/assets/images/simpleqa_benchmark_comparison.png)
Expand Down Expand Up @@ -156,7 +173,7 @@ If you have any questions - feel free to join our [community chat](https://t.me/

This project is developed by the **neuraldeep** community. It is inspired by the Schema-Guided Reasoning (SGR) work and [SGR Agent Demo](https://abdullin.com/schema-guided-reasoning/demo)↗️ delivered by "LLM Under the Hood" community and AI R&D Hub of [TIMETOACT GROUP Österreich](https://www.timetoact-group.at)↗️

![](./docs/assets/images/rmr750x200.png)
![](rmr750x200.png)

This project is supported by the AI R&D team at red_mad_robot, providing research capacity, engineering expertise, infrastructure, and operational support.

Expand Down
7 changes: 7 additions & 0 deletions config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ execution:
logs_dir: "logs" # Directory for saving agent execution logs
reports_dir: "reports" # Directory for saving agent reports

# Optional: Agent Client Protocol (stdio) via `sgracp --config config.yaml`
# acp:
# agent: "sgr_agent" # Default agent; must match a name under agents:
# models: # Extra models offered in the ACP "model" selector,
# - "gpt-4o" # in addition to each agent's own configured model.
# - "o3-mini" # Clients let the user switch agent and model at runtime.

# Prompts Configuration
# prompts:
# # Option 1: Use file paths (absolute or relative to project root)
Expand Down
4 changes: 2 additions & 2 deletions docs/en/framework/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This section dives into the technical implementation of agents and explores how to adapt them to your needs.

!!! Tip "Agent Architecture"
Information about available agents and their differences can be found in [Main Concepts](main-concepts.md#agent).
Information about available agents and their differences can be found in [Main Concepts](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/main-concepts.md#agent).


*For a detailed understanding of the full logic, it's better to familiarize yourself with the [source code](https://github.com/vamplabAI/sgr-agent-core/blob/main/sgr_agent_core/base_agent.py).*
Expand Down Expand Up @@ -137,7 +137,7 @@ When creating custom solutions, pay attention first and foremost to these method
Stores all agent settings: LLM parameters, search, execution, prompts, and MCP configuration.

!!! Tip "More about configuration"
Full description of the configuration system, settings hierarchy, and usage examples can be found in the [configuration guide](configuration.md).
Full description of the configuration system, settings hierarchy, and usage examples can be found in the [configuration guide](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/configuration.md).

#### Extending Configuration

Expand Down
30 changes: 30 additions & 0 deletions docs/en/framework/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,36 @@ config = GlobalConfig.from_yaml("config.yaml")

An example can be found in [`config.yaml.example`](https://github.com/vamplabAI/sgr-agent-core/blob/main/config.yaml.example).

### Agent Client Protocol (`sgracp`)

The optional top-level `acp` section configures the [`sgracp`](https://github.com/vamplabAI/sgr-agent-core) stdio entrypoint (Agent Client Protocol over stdin/stdout). It uses the same `agents:` definitions as the rest of the stack.

| Field | Description |
| ----- | ----------- |
| `agent` | Name of an entry under `agents:` used as the **default** when a client connects. If omitted, the first agent in `agents:` is used. |
| `models` | Optional list of extra model ids offered in the ACP model selector, in addition to the model each agent already declares. |

Example:

```yaml
acp:
agent: sgr_agent
models:
- gpt-4o
- o3-mini
```

You can also set `SGR__ACP__AGENT` in the environment (see `pydantic-settings` nested env rules for your version).

#### Switching agent and model at runtime

The bridge exposes the active **agent** and **model** as [ACP session config options](https://agentclientprotocol.com/protocol/v1/session-config-options), so compatible clients (Zed, etc.) let the user switch them from the UI during a session:

- The **Agent** selector lists every entry under `agents:`; the chosen one is used for the next turn.
- The **Model** selector lists each agent's configured model plus anything in `acp.models`; the chosen model overrides `llm.model` for that session only (the agent definition is left untouched).

Changes apply to the next turn; an in-flight turn keeps its current settings. This replaces the removed `session/set_model` method — model selection now goes through `session/set_config_option`.

### Observability and Langfuse integration

SGR Agent Core supports optional [Langfuse](https://langfuse.com) integration for LLM tracing:
Expand Down
2 changes: 1 addition & 1 deletion docs/en/framework/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if __name__ == "__main__":
1. This agent uses exclusively native tool calling, making it well-suited for getting started
2. Default parameters will be set here if you don't override some of them
3. For the example, we'll take a minimal pair of tools that will allow getting an answer to the task and completing the agent's work.
Learn more about tools in the [tools documentation](tools.md)
Learn more about tools in the [tools documentation](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools.md)

???example "Example of Agent Reasoning Log"
```log
Expand Down
6 changes: 3 additions & 3 deletions docs/en/framework/main-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This document describes the key entities of the SGR Deep Research Framework.

![SGR Agent Core Concept](../../assets/images/sgr_concept.png)
![SGR Agent Core Concept](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/assets/images/sgr_concept.png)

## Vibe Glossary

Expand Down Expand Up @@ -156,7 +156,7 @@ All created tools are automatically registered in `ToolRegistry`
**MCPBaseTool** — Base class for tools integrated with MCP (Model Context Protocol) servers. Handles calls through MCP client, converts them to the framework tool format

!!!tip
*For more details on tools and their usage: [Tools](tools.md)*
*For more details on tools and their usage: [Tools](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools.md)*

## Definition

Expand All @@ -170,7 +170,7 @@ Agent object - Agent+Definition: Ready agent with isolated context, history, log

**AgentConfig** — centralized agent configuration combining LLM, search, execution, prompts, and MCP settings. Supports hierarchical configuration system through `GlobalConfig` and `AgentDefinition` with automatic parameter inheritance and override.
!!!tip
*For more details on configuration and definitions: [Configuration Guide](configuration.md)*
*For more details on configuration and definitions: [Configuration Guide](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/configuration.md)*


## Registry
Expand Down
2 changes: 1 addition & 1 deletion docs/en/framework/qna.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

**4. Wrapper and infrastructure**

- **`AgentDefinition` and `AgentConfig`** — the [documentation](configuration.md) already explains why it's so complex
- **`AgentDefinition` and `AgentConfig`** — the [documentation](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/configuration.md) already explains why it's so complex
- **`services/registry` + `agent_factory`** — the final picture of how everything works will come together

**5. Remaining topics**
Expand Down
18 changes: 9 additions & 9 deletions docs/en/framework/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Tools are divided into two categories:

| Item | Category | Description |
| --- | --- | --- |
| [ReasoningTool](tools/reasoning-tool.md) | System | Core tool for Schema-Guided Reasoning agents that determines the next reasoning step |
| [FinalAnswerTool](tools/final-answer-tool.md) | System | Final answer tool that completes the research task and updates agent state |
| [CreateReportTool](tools/create-report-tool.md) | System | Tool for generating a detailed research report with inline citations and saving it to disk |
| [ClarificationTool](tools/clarification-tool.md) | System | Tool for asking clarification questions and pausing execution until user response |
| [GeneratePlanTool](tools/generate-plan-tool.md) | System | Tool for creating an initial research plan and breaking a request into steps |
| [AdaptPlanTool](tools/adapt-plan-tool.md) | System | Tool for updating an existing research plan based on new information |
| [WebSearchTool](tools/web-search-tool.md) | Auxiliary | Web search tool powered by Tavily Search API for fresh information |
| [ExtractPageContentTool](tools/extract-page-content-tool.md) | Auxiliary | Tool for extracting full content from specific web pages using Tavily Extract API |
| [RunCommandTool](tools/run-command.md) | Auxiliary | Tool for executing shell commands in safe or unsafe mode inside a workspace boundary |
| [ReasoningTool](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools/reasoning-tool.md) | System | Core tool for Schema-Guided Reasoning agents that determines the next reasoning step |
| [FinalAnswerTool](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools/final-answer-tool.md) | System | Final answer tool that completes the research task and updates agent state |
| [CreateReportTool](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools/create-report-tool.md) | System | Tool for generating a detailed research report with inline citations and saving it to disk |
| [ClarificationTool](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools/clarification-tool.md) | System | Tool for asking clarification questions and pausing execution until user response |
| [GeneratePlanTool](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools/generate-plan-tool.md) | System | Tool for creating an initial research plan and breaking a request into steps |
| [AdaptPlanTool](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools/adapt-plan-tool.md) | System | Tool for updating an existing research plan based on new information |
| [WebSearchTool](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools/web-search-tool.md) | Auxiliary | Web search tool powered by Tavily Search API for fresh information |
| [ExtractPageContentTool](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools/extract-page-content-tool.md) | Auxiliary | Tool for extracting full content from specific web pages using Tavily Extract API |
| [RunCommandTool](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/tools/run-command.md) | Auxiliary | Tool for executing shell commands in safe or unsafe mode inside a workspace boundary |

## BaseTool

Expand Down
14 changes: 7 additions & 7 deletions docs/en/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ If you want to use SGR Agent Core as a Python library (framework):
pip install sgr-agent-core
```

See the [Installation Guide](installation.md) for detailed instructions and the [Using as Library](../framework/first-steps.md) guide to get started.
See the [Installation Guide](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/getting-started/installation.md) for detailed instructions and the [Using as Library](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/first-steps.md) guide to get started.

### CLI Tool (`sgrsh`)

Expand Down Expand Up @@ -115,19 +115,19 @@ if __name__ == "__main__":

## Documentation

- **[Highlights](../highlights.md)** — What's cool about this framework: short cases and intuitive examples
- **[Installation](installation.md)** — Detailed installation instructions for pip and Docker
- **[Agent Core Framework](../framework/main-concepts.md)** — Understand the core concepts and architecture
- **[Using as Library](../framework/first-steps.md)** — Learn how to use SGR Agent Core as a Python library
- **[API Server Quick Start](../sgr-api/SGR-Quick-Start.md)** — Get started with the REST API service
- **[Highlights](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/highlights.md)** — What's cool about this framework: short cases and intuitive examples
- **[Installation](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/getting-started/installation.md)** — Detailed installation instructions for pip and Docker
- **[Agent Core Framework](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/main-concepts.md)** — Understand the core concepts and architecture
- **[Using as Library](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/first-steps.md)** — Learn how to use SGR Agent Core as a Python library
- **[API Server Quick Start](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/sgr-api/SGR-Quick-Start.md)** — Get started with the REST API service

## Contact & Community

**For collaboration inquiries**: [@VaKovaLskii](https://t.me/neuraldeep)

**Community Chat**: We answer questions in [Telegram chat](https://t.me/sgragentcore) (ru/en)

![](../../assets/images/rmr750x200.png)
![](rmr750x200.png)

This project is supported by the AI R&D team at red_mad_robot, providing research capacity, engineering expertise, infrastructure, and operational support.

Expand Down
6 changes: 3 additions & 3 deletions docs/en/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ docker build -t sgr-agent-core:latest .

## Configuration

After installation, you'll need to configure your API keys and settings. See the [Configuration Guide](../framework/configuration.md) for detailed instructions.
After installation, you'll need to configure your API keys and settings. See the [Configuration Guide](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/configuration.md) for detailed instructions.

### Quick Configuration

Expand All @@ -162,5 +162,5 @@ export SGR__LLM__MODEL="gpt-4o"

## Next Steps

* **[Quick Start Guide](../framework/first-steps.md)** — Get started with your first agent
* **[Configuration Guide](../framework/configuration.md)** — Configure your agents
* **[Quick Start Guide](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/first-steps.md)** — Get started with your first agent
* **[Configuration Guide](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/configuration.md)** — Configure your agents
14 changes: 7 additions & 7 deletions docs/en/highlights.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
This page answers one simple question: **What's cool about this framework?**
Short cases and intuitive examples; for more complete and detailed docs go to:

- [Main Concepts](framework/main-concepts.md)
- [Configuration Guide](framework/configuration.md)
- [Getting Started](getting-started/index.md)
- [Main Concepts](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/main-concepts.md)
- [Configuration Guide](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/configuration.md)
- [Getting Started](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/getting-started/index.md)

---

Expand Down Expand Up @@ -69,7 +69,7 @@ The idea: you describe an agent (in code or a config file) and run it for a spec
**-->RTFM**

- install `sgr-agent-core`;
- read the [configuration](framework/configuration.md) and [main concepts](framework/main-concepts.md) sections;
- read the [configuration](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/configuration.md) and [main concepts](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/main-concepts.md) sections;
- describe agents via `config.yaml` and `agents.yaml` (or any other convenient form);
- extend base entities in code to fit your agent's logic and tools;
- call `execute()`.
Expand Down Expand Up @@ -105,7 +105,7 @@ Think of it like docker compose — **one YAML that describes what to do**:
4. An API spins up — by default at `http://localhost:8010`, Swagger at `http://localhost:8010/docs`.
5. Send requests using the OpenAI chat/completions protocol.

More details — [API Server Quick Start](sgr-api/SGR-Quick-Start.md).
More details — [API Server Quick Start](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/sgr-api/SGR-Quick-Start.md).

---

Expand Down Expand Up @@ -184,7 +184,7 @@ docker run -d \

After startup open `http://localhost:3000` — agents from your config will appear in the models list.

![Open WebUI with SGR agent](../assets/images/openwebui_example.png)
![Open WebUI with SGR agent](openwebui_example.png)

> **Important:** when connecting to Open WebUI you need to switch the streaming adapter. In `config.yaml` set:
> ```yaml
Expand Down Expand Up @@ -233,7 +233,7 @@ agents:
- "final_answer_tool"
```

Full configuration schema and examples in [Configuration Guide](framework/configuration.md).
Full configuration schema and examples in [Configuration Guide](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/en/framework/configuration.md).

---

Expand Down
4 changes: 2 additions & 2 deletions docs/ru/framework/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
В этом разделе погрузимся в техническую реализацию агента и разберём подробнее, как это можно адаптировать под свои нужды

!!! Tip "Архитектура агентов"
Информация о доступных агентах и их различиях находится в [Основных концепциях](main-concepts.md#agent).
Информация о доступных агентах и их различиях находится в [Основных концепциях](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/ru/framework/main-concepts.md#agent).


*Для детального понимания полной логики лучше ознакомиться с [исходным кодом](https://github.com/vamplabAI/sgr-agent-core/blob/main/sgr_agent_core/base_agent.py).*
Expand Down Expand Up @@ -137,7 +137,7 @@ class BaseAgent:
Хранит все настройки агента: параметры LLM, поиска, выполнения, промпты и MCP конфигурацию.

!!! Tip "Подробнее о конфигурации"
Полное описание системы конфигурации, иерархии настроек и примеры использования находятся в [руководстве по конфигурации](configuration.md).
Полное описание системы конфигурации, иерархии настроек и примеры использования находятся в [руководстве по конфигурации](Соцсети/_архив/AiConf/aiconf/sgr-agent-core/docs/ru/framework/configuration.md).

#### Расширение конфигурации

Expand Down
Loading
Loading