AgentEra/Agently
[GenAI Application Development Framework] 🚀 Build GenAI application quick and easy 💬 Easy to interact with GenAI agent in code using structure data and chained-calls syntax 🧩 Use Event-Driven Flow *TriggerFlow* to manage complex GenAI working logic 🔀 Switch to any model without rewrite application code
Agently – A Production‑Ready AI Application Runtime
What it is – A Python library that gives you a structured, observable, and restart‑safe way to build AI‑backed services (assistants, copilots, workflow APIs, etc.). It sits between a large‑language model and your business code, turning a single model call into a full‑featured runtime unit with:
- Typed request/response contracts – you declare the expected JSON schema up‑front with
.output(...); the framework validates, retries and extracts the fields for you. - Streaming with partial structure – the
instantmode emits events as each field is filled, so a UI or downstream workflow can react before the whole response finishes. - Actions / tools – functions (Python, shell, Node, SQLite, MCP servers, sandboxed runtimes) are registered as Actions that the model can invoke, with full logging and observability.
- Skills – immutable, versioned guidance snippets that can be attached to an execution without being hidden inside the model.
- Execution resources – reusable runtime environments (browser, sandbox, gVisor, etc.) that are lazily started and owned by a workflow.
- TriggerFlow orchestration – a signal‑driven workflow engine that supports pause/resume, sub‑flows, event fan‑out and persistent snapshots.
- Dynamic tasks – turn model‑generated DAG data into validated, observable task graphs.
Who it’s for – product engineers building reliable AI services, platform teams needing clear extension points for model providers and tools, and technical leads who want explicit contracts and debuggable execution rather than ad‑hoc prompt glue.
Key concepts
| Concept | Role | Example from README |
|---|---|---|
| AgentExecution | The runtime unit that owns a single model call, its prompt slots, selected actions/skills, and the resulting data. | agent.input(...).output(...).get_result() |
| Structured request | Prompt built from named slots; output schema declared with .output({"field": (type, description, required)}). |
agent.role(...).info(...).instruct(...).input(...).output({...}) |
| Instant streaming | Emits event.path updates while the model is still generating tokens, enabling UI updates or workflow signals. |
for event in result.get_generator(type="instant"): |
| Action | Callable (Python, shell, Node, MCP, etc.) that the model can request; logs are attached to the execution result. | @agent.action_func def calculate_total(...): |
| Skill | Versioned guidance library that can be bound to an execution without being executed itself. | Agently.skills_executor (read‑only) |
| Execution Resource | Managed external runtime (browser, sandbox, gVisor, SQLite) that lives for the life of a workflow. | Execution Resource providers manage reusable resources such as MCP processes, browser sessions… |
| TriggerFlow | Event‑driven workflow engine supporting pause/resume, sub‑flows and persistent snapshots. | TriggerFlow supports events, fan‑out, runtime streams, pause/resume, save/load… |
| Dynamic Task | Converts model‑generated DAG data into a validated task graph that can be executed step‑by‑step. | Agently.create_dynamic_task(...) |
How you use it (quick start from the README)
- Install –
pip install -U agently. - Configure a model provider – e.g. DeepSeek or a local Ollama endpoint via
Agently.set_settings("OpenAICompatible", {...}). - Create an agent –
agent = Agently.create_agent(). - Declare the prompt and output schema – chain
.role(),.info(),.input(), and.output({...}). - Run – call
.get_result()(or the async variant) to obtain aAgentExecutionResultwithget_data(),get_text(), etc. - Add actions/skills – register Python functions with
@agent.action_funcor enable built‑in helpers (agent.enable_python(),agent.enable_shell(), …). - Orchestrate – use TriggerFlow or Dynamic Task APIs for longer‑running, signal‑driven workflows.
Why choose Agently over alternatives
- Uniform contracts – switching model providers does not require rewriting business logic; the same
.outputschema, action logs and skill bindings stay intact. - Built‑in observability – actions produce structured logs, streaming events are exposed, and the framework offers dev‑tools for debugging.
- Production‑ready features – retry‑aware output parsing, pause‑resume workflow snapshots, resource lifecycle management, and explicit error handling.
- Focused scope – unlike LangChain’s huge integration surface, Agently concentrates on request/response contracts, tool execution and signal‑driven orchestration, which many production teams find easier to maintain.
Where to learn more – Docs site (https://agently.tech/docs), the extensive release‑note markdown files, and the examples/ directory (basic usage, FastAPI service, action runtime, trigger flow, dynamic task, etc.).
Related
- Project
- Project
- Project
- Project
- Project