Favicon of Agently

Agently

Python AI agent framework for local Ollama models or hosted APIs, with validated outputs and recoverable workflows. Open core under Apache 2.0.

Screenshot of Agently website

Agently is a Python AI agent framework for developers building assistants and service backends with local Ollama models or hosted model APIs. It runs within your application, without requiring a separate orchestration service. Model requests go to the endpoint you choose, so using a remote provider sends the request data outside your machine.

Its focus is keeping application behavior predictable when model responses vary. Output schemas define required fields and types, while parsing feedback, retries and validation rules check the result. Structured streaming lets an interface update individual fields before generation finishes; those partial values remain provisional until final validation.

Agents can call local functions, use MCP servers and run code through a selected sandbox. Reusable Skills supply task guidance, while the host application decides which actions the agent may execute. Action records include results and references to generated files, code and logs for inspection.

TriggerFlow handles branching and parallel work, with external events and human review as workflow inputs. Persistent pause and resume let processes recover across interruptions. Dynamic Task validates generated task plans before execution, and session memory maintains context for conversational exchanges.

The framework supports OpenAI-compatible, OpenAI Responses-compatible and Anthropic-compatible APIs, with a documented Ollama example using Qwen. Agently follows an open-core model: its core uses Apache 2.0, while enterprise extensions and services have separate commercial agreements. FastAPI helpers expose agents and workflows through HTTP, server-sent events and WebSockets.

Similar to Agently