SGR Agent Core

Build research agents with structured reasoning, tool use, and a self-hosted API.

Stars
★ 1.1k
Last updated
2mo ago 0.7.1
FARS reviewed
Nov 08, 2026
License
MIT
Primary language
Python

At a glance

How it runs
Self-hosted serviceLibrary / SDKFramework
Works with
Universal · cross-platformOpenAI API
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Docker or PythonOpenAI-compatible LLMOpenAI API key when using OpenAITavily API key for optional web search and page extractionShell / CLINetwork accessLocal filesystem
Typical use
An engineering team that needs an internally hosted research service can run the Docker image, expose an OpenAI-compatible API, and persist logs and reports on the host.
Not a fit if
  • Users wanting zero-config setup without editing YAML or adding Tavily keys
  • Teams needing native ChatGPT, Claude, or Claude Code integration
Maintenance
Commits in the last 6 monthslast commit 2026-09-16latest release 0.7.1 (2026-07-15)

What does this agent do, and when should you use it?

SGR Agent Core is an open-source research-agent framework built around Schema-Guided Reasoning, an extensible BaseAgent interface, and a two-phase architecture. It includes SGRAgent, ToolCallingAgent, and SGRToolCallingAgent, along with tools for search, reasoning, and clarification. The project can be installed as a Python library or deployed as a REST service with OpenAI-compatible endpoints and SSE streaming. Users can also interact through the sgrsh terminal client or expose an agent to editors and tools through sgracp and the stdio-based Agent Client Protocol. It works with OpenAI-compatible LLMs, including local models for private research, while Tavily can optionally supply web search and page extraction.

The user selects an agent under the YAML agents: configuration and supplies an OpenAI-compatible model plus any optional tools. SGRAgent, ToolCallingAgent, or SGRToolCallingAgent accepts a research query, organizes Schema-Guided Reasoning through BaseAgent's two-phase architecture, and invokes configured search, page-extraction, reasoning, or clarification tools. During execution, it can request clarification or return intermediate dialog results, while SSE provides real-time response delivery. The completed output is exposed through an OpenAI-compatible REST API, an sgrsh session, or newline-delimited JSON-RPC over stdio with sgracp; the Docker example also persists logs and reports in mounted directories.

  1. An engineering team that needs an internally hosted research service can run the Docker image, expose an OpenAI-compatible API, and persist logs and reports on the host.
  2. A Python developer embedding research workflows in an application can install sgr-agent-core and extend BaseAgent with custom agents and tools.
  3. A team with an existing OpenAI API client can point it at the compatible service endpoints and consume streamed results over SSE.
  4. An organization handling sensitive queries can pair the framework with a local OpenAI-compatible model for fully private research.
  5. A terminal user conducting iterative investigations can use sgrsh for one-off questions or interactive chat with clarification handling.
  6. A developer using an Agent Client Protocol editor or tool can launch a configured SGR agent over stdio with sgracp.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install sgr-agent-core
Ports
8010
Config files
examples/sgr_deep_research/config.yaml
Install notes cover
Docker

How do you install or deploy this agent?

For the Python library, run pip install sgr-agent-core. Prepare the research configuration with cp examples/sgr_deep_research/config.yaml.example examples/sgr_deep_research/config.yaml, then set llm.api_key. If Tavily-backed search or page extraction is enabled, also set tools.web_search_tool.api_key and tools.extract_page_content_tool.tavily_api_key.

For Docker, run git clone https://github.com/vamplabai/sgr-agent-core.git, followed by cd sgr-agent-core. Create writable locations with sudo mkdir -p logs reports and sudo chmod 777 logs reports. After copying and editing the configuration, run docker run --rm -i --name sgr-agent -p 8010:8010 -v $(pwd)/examples/sgr_deep_research:/app/examples/sgr_deep_research:ro -v $(pwd)/logs:/app/logs -v $(pwd)/reports:/app/reports ghcr.io/vamplabai/sgr-agent-core:latest --config-file /app/examples/sgr_deep_research/config.yaml --host 0.0.0.0 --port 8010. The service is then available at http://localhost:8010, with Swagger UI at http://localhost:8010/docs.

How do you use this agent?

After configuration, start the server with sgr --config-file examples/sgr_deep_research/config.yaml or sgr -c examples/sgr_deep_research/config.yaml. The documented Python entry point is python -m sgr_agent_core.server --config-file examples/sgr_deep_research/config.yaml. For a first CLI request, run sgrsh -a sgr_agent "What is AI?"; running sgrsh -a sgr_agent without a query starts interactive mode. For ACP clients, run sgracp --config examples/sgr_deep_research/config.yaml. An optional acp: {agent: sgr_agent} configuration selects the exposed agent; otherwise, the first definition under agents: is used.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

FARS trust-control audit

Not found in source — apply before daily use
  • least-privilege scoping — Grant only what the task needs: a dedicated account or read-only token, scoped to specific directories and repos.
  • confirmation before acting — Turn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • disclosed external effects — Establish which external systems it writes to, sends to or changes, and verify with test accounts or repos before production.
  • rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.

What are this agent's strengths and limitations?

Pros
  • One project supplies a Python framework, OpenAI-compatible REST service, SSE streaming, interactive CLI, and ACP-over-stdio interface.
  • Teams can choose SGRAgent, ToolCallingAgent, or the combined SGRToolCallingAgent and extend BaseAgent with their own agents and tools.
  • Support for OpenAI-compatible models includes local models, enabling a fully private research deployment path.
  • A published Docker image, sample configuration, Swagger UI, and stated comprehensive test coverage reduce initial deployment and evaluation work.
Limitations
  • End-to-end online research still requires a model service and its credentials; the example also needs separate Tavily credentials when its search or extraction tools are enabled.
  • The Docker quick start grants mode 777 to the logs and reports directories, which security-conscious deployments will likely need to replace with tighter ownership and permissions.
  • OpenAI API compatibility does not establish native integration with ChatGPT, Claude AI, Claude Code, or the Claude API; none is documented in the supplied material.
  • The published SimpleQA result covers only gpt-4.1-mini and does not provide comparative evidence for other models, private datasets, or production workloads.

How does this agent compare with similar options?

The framework offers three internal approaches: SGRAgent for Schema-Guided Reasoning, ToolCallingAgent for tool-calling behavior, and SGRToolCallingAgent for a hybrid of the two. The supplied material does not provide a detailed performance or suitability comparison among them, nor a direct comparison with external frameworks.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
SGR Agent Core This agent 50 · Major gaps Self-hosted serviceFree + model costs ★ 1.1k 2mo ago Python OpenAI API
fx Coding Agent 65 · Some gaps CLIFree + model costs ★ 4.1k today Zig ChatGPT · Codex · OpenAI API
Jevbridge Decision Sidecar 60 · Some gaps CLIFree + model costs ★ 51 2mo ago TypeScript Codex · OpenAI API · Claude API
YoMo 39 · Major gaps CLIFree + model costs ★ 1.9k 9d ago Rust —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
50/ 100 5-point scale 2.5 / 5
Trust 6/29
Reliability 9/14
Adaptability 12/18
Convention 12/18
Effectiveness 7/13
Verifiability 4/8
Why each dimension lost points
Trust6 / 29 · 1.0/5

The server reads bind address and port from configuration and dynamically loads agents; the API enables wildcard CORS, and the Docker quick start asks for chmod 777 on logs/reports. The sample shows no tool permission isolation or user confirmation, so least privilege, external effects, and rollback score 0. The README identifies OpenAI-compatible models and optional Tavily keys, showing some data paths, but the sample does not explain secret storage, log redaction, or retention; data-flow transparency and sensitive-data handling score 1. Optional dependencies are split by feature and missing packages produce actionable errors, but there is no evidence of version pinning, vulnerability review, or mitigation, so dependency security scores 1. The README and pyproject list concept origins, contributor roles, and repository details, providing attribution clues; publisher identity remains unknown, so source attribution scores 2.

Reliability9 / 14 · 3.2/5

The entrypoints lazily import optional dependencies, and the ACP and HTTP configuration paths fit together; the sample includes ACP behavior tests, but the README's claims of comprehensive coverage and benchmark accuracy are not independently substantiated by the supplied material, so self-consistency scores 2. Core and optional dependencies have minimum versions, and missing optional packages yield actionable messages, but there is no lockfile or service availability policy, so dependency availability scores 2. Configuration errors log the relevant file and cause, and missing optional dependencies receive clear guidance; evidence for handling runtime external failures is limited, so failure messages score 2.

Adaptability12 / 18 · 3.3/5

The README targets developers and research agents and describes CLI, HTTP, ACP, tool extension, streaming, and OpenAI-compatible models. This covers several scenarios but does not show ordinary end-user needs, so audience and scenarios score 2. Configuration-driven agents, tools, and optional integrations make capability boundaries visible; the sample omits full tool implementations and abuse-boundary documentation, so capability boundaries score 2. The sample skills have specific triggers for citation formatting and concise responses, while agent types and entrypoints are documented, so trigger precision scores 2. Python 3.11–3.13, Docker, library installation, CLI, HTTP, and stdio ACP are documented, so environment fit scores 2.

Convention12 / 18 · 3.3/5

The README is organized around installation, quick start, CLI, ACP, benchmarks, and team information; pyproject and entrypoints reinforce that structure, so information architecture scores 2. Installation covers pip, extras, Docker, and API key configuration, but the chmod 777 example grants overly broad permissions, so install notes score 2. Package, command, and agent names are mostly consistent across README, pyproject, and source, so naming stability scores 2. The README provides several runnable examples and the skills include format examples; no FAQ appears in the sample, so examples and FAQ score 2. The README claims production readiness, comprehensive tests, and benchmark performance without a limitations, risk, or scope section in the sample, so known limitations score 1. The MIT license is explicit in both the license file and metadata, so license scores 3. setuptools-scm derives versions from tags and the configuration describes the release flow; no changelog is included in the sample, so versioning and changelog score 2. The README and pyproject name contributors, roles, repository, issue tracker, and documentation, but make no clear ongoing maintenance commitment or support-time promise, so maintenance responsibility scores 2.

Effectiveness7 / 13 · 2.7/5

The framework offers an OpenAI-compatible REST API, SSE, CLI, and ACP, with copyable startup steps in the README, so output usability scores 2. Schema-Guided Reasoning, multiple agent types, extensible tools, and research configurations show added workflow value beyond a basic LLM call; the README's benchmark claim lacks detailed methodology in the sample, so marginal value scores 2. A small core install and opt-in integrations help control overhead, but the Docker example requires broad directory permissions and gives no resource or cost estimate, so cost-benefit scores 1.

Verifiability4 / 8 · 2.5/5

Repository, documentation, and contributor details are traceable, but the accuracy, production-readiness, and test-coverage claims lack methods, revision details, or results in the sample, so claim traceability scores 1. The README, pyproject, entrypoint code, and ACP tests corroborate the product shape and optional-dependency design, so cross-source corroboration scores 2. The README presents feature descriptions, installation facts, and performance claims together without clearly separating verified facts from promotional summaries, so fact-inference separation scores 1.

Risks and how to mitigate them
  • Not found in source: least-privilege scopingGrant only what the task needs: a dedicated account or read-only token, scoped to specific directories and repos.
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Not found in source: disclosed external effectsEstablish which external systems it writes to, sends to or changes, and verify with test accounts or repos before production.
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • The HTTP API allows all CORS origins, and the Docker quick start applies chmod 777 to log and report directories. Restrict origins and directory permissions before deployment.
  • Performance and test-coverage statements are README claims; this static review does not constitute execution or independent reproduction.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 1775f8bbf309
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/sgr-agent-core.svg)](https://followagents.com/en/agents/sgr-agent-core)
<a href="https://followagents.com/en/agents/sgr-agent-core"><img src="https://followagents.com/badge/sgr-agent-core.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. 0.7.1
    Release notes excerpt
    What's Changed * Add Langfuse observability integration support by @hijera in https://github.com/vamplabAI/sgr-agent-core/pull/187 * feat: Agent Client Protocol (sgracp) stdio server by @EvilFreelancer in https://github.com/vamplabAI/sgr-agent-core/pull/188 * Update benchmark image path in results document by @virrius in https://github.com/vamplabAI/sgr-agent-core/pull/190 * Update overlayfs_manager.py by @virrius in https://github.com/vamplabAI/sgr-agent-core/pull/189 …
    View on GitHub ↗
  2. 0.7.0
    Release notes excerpt
    What's Changed * Tunes of documentation by @EvilFreelancer in https://github.com/vamplabAI/sgr-agent-core/pull/159 * #157 Tunes of readme and order of data by @EvilFreelancer in https://github.com/vamplabAI/sgr-agent-core/pull/160 * agent execution cancellation by @virrius in https://github.com/vamplabAI/sgr-agent-core/pull/158 * OpenGraph tags added to docs by @EvilFreelancer in https://github.com/vamplabAI/sgr-agent-core/pull/162 * Missed libraries restored by @EvilFreelancer in https://github.com/vamplabAI/sgr-agent-core/pull/163 …
    View on GitHub ↗
  3. 0.6.0
    Release notes excerpt
    What's Changed * Refactor agent API to support OpenAI message format by @virrius in https://github.com/vamplabAI/sgr-agent-core/pull/137 What's Changed * Bugfix: SGRTool calling agent derives _prepare_tools() from SGRAgent by @virrius in https://github.com/vamplabAI/sgr-agent-core/pull/132 * Refactor agent API to support OpenAI message format by @virrius in https://github.com/vamplabAI/sgr-agent-core/pull/137 * Version 0.5.2 by @EvilFreelancer in https://github.com/vamplabAI/sgr-agent-core/pull/140 …
    View on GitHub ↗

FAQ

Must I use an OpenAI-hosted model?
No. The framework supports any OpenAI-compatible LLM and explicitly includes local models for fully private research. An OpenAI API key is needed when OpenAI is the selected provider.
Is Tavily mandatory?
No. The example marks Tavily credentials as optional; they are needed when the associated web-search or page-extraction tools are enabled.
How can clients receive research results?
The documented choices are an OpenAI-compatible REST API, SSE streaming, the sgrsh command-line client, and stdio JSON-RPC through sgracp.
What filesystem permissions does the deployment need?
The Docker example mounts the configuration, logs, and reports directories and requires the last two to be writable. It uses chmod 777; production operators should substitute permissions appropriate to their container and security policy.
Does the benchmark predict performance on my workload?
Not by itself. The supplied result reports 86.08% accuracy on SimpleQA with gpt-4.1-mini—3,724 correct, 554 incorrect, and 48 not attempted—but provides no evidence for other models or domain-specific workloads.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts