Agently treats AI apps as runtime executions, not prompt glue
Agently gives GenAI backends a runtime contract for structured outputs, observable actions, and event-driven workflows so you can swap models without rewriting business logic.

What it does
Agently is a Python framework (≥3.10) for building AI service backends. It wraps model providers in a uniform request contract—prompt slots, response parsing, action execution, and structured output validation—so switching from GPT-4 to Claude or DeepSeek doesn’t reshape your business logic. The runtime handles streaming responses, recoverable multi-step workflows, and tool execution through a shared Action Runtime that supports local functions, MCP servers, shell scripts, and sandboxes.
The interesting bit
Instead of treating structured output as a vendor perk, Agently owns the entire pipeline: schema-as-prompt authoring, required-field extraction, parser feedback, retries with ensure_keys, and validation handlers. Its orchestration layer, TriggerFlow, is event-driven rather than strictly graph-shaped, which means workflow signals can fire off partial structured outputs while the model is still streaming—useful for UI updates and long-running tasks that need pause/resume or crash recovery.
Key highlights
- Model portability: Normalizes provider setup, prompt slots, and response parsing so model swaps are configuration changes, not rewrites.
- Framework-guaranteed structured output:
.output(...)schemas, parser feedback, retries, andensure_all_keyswork even when the underlying model lacks native JSON schema support. - TriggerFlow orchestration: Event/signal-driven workflows with fan-out, runtime streams, sub-flows, save/load, and close snapshots.
- Instant streaming mode: Surfaces structured fields before the final token arrives, letting SSE routes and workflow signals react mid-generation.
- Runtime Skills and Actions:
agent.use_skills(...)discovers and mounts capabilities dynamically; the Action Runtime produces structured records for local functions, MCP services, and sandboxed code execution.
Verdict
Teams building production AI services—backed APIs, copilots, or operation workflows—that need stable output contracts, observable execution, and the ability to survive model changes should evaluate Agently. If your project is just one or two simple prompts, the README itself suggests staying closer to direct SDK calls.
Frequently asked
- What is AgentEra/Agently?
- Agently gives GenAI backends a runtime contract for structured outputs, observable actions, and event-driven workflows so you can swap models without rewriting business logic.
- Is Agently open source?
- Yes — AgentEra/Agently is open source, released under the Apache-2.0 license.
- What language is Agently written in?
- AgentEra/Agently is primarily written in Python.
- How popular is Agently?
- AgentEra/Agently has 1.6k stars on GitHub.
- Where can I find Agently?
- AgentEra/Agently is on GitHub at https://github.com/AgentEra/Agently.