Help us shape the future of Go! Take the 2026 Go Developer Survey

agently-core

module
v0.1.58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: Apache-2.0

README

Agently Core

Go Reference License

Agently Core is an embeddable Go framework for building agents that use tools, work with knowledge and data, coordinate other agents, and carry work across conversations and scheduled runs. It provides the execution, policy and durable state behind an agentic application.

Embed it in your service when you want to own the application and integrations. Use Agently for the assembled server, CLI, web application and native mobile shells, with Forge for metadata-driven interfaces.

What Core brings to an agentic application

  • Configurable agent behavior. Compose model selection, prompts, intent profiles, knowledge, skills, templates and tool bundles through a workspace. Intake and prompt binding prepare the task for an iterative model/tool loop.
  • Tools under a shared policy. Dispatch internal services and MCP tools, govern access, request approvals and collect missing inputs through elicitation. Connect external systems without baking their APIs into the orchestration loop.
  • Durable work. Store conversations, turns, messages, calls and execution state. Coordinate queued turns, cancellation, continuation and recovery; keep observer lifetimes separate from running work.
  • Agent coordination and autonomous execution. Run linked agents and long-running operations, track conversation goals and budgets, and schedule work through controller-owned turns and distributed scheduler leases.
  • Interactive results. Produce canonical transcripts, live tool feeds, hosted workspaces and reports with authored layouts, data sources and visual content. Clients consume these results through AG-UI and application APIs.
  • Extensible boundaries. Supply providers, resource finders, tools, integrations and application handlers. Use the Go runtime directly or build web, mobile and CLI clients with the Go, TypeScript, Swift and Kotlin SDKs.

Architecture

The authenticated runtime resolves the task's agent and configuration, creates its durable turn, builds model context and executes the model/tool loop. Tool results become observations for subsequent model calls; approvals and elicitation can suspend work until the required decision or input arrives. Async operations and linked agents retain their invocation relationships.

Execution state and presentation are connected through persisted identities. AG-UI carries conversation runs, messages, tool activity, state and interrupts; Agently extensions carry workspace content, goals, approvals and queued-turn controls. Supporting BFF APIs expose history, resources and application state. Clients can reattach to admitted work while the runtime owns execution and recovery. See the architecture guide for the lifecycle and subsystem boundaries.

Capabilities and guides

Area Capabilities Deep dive
Agent orchestration Intake, agent/model selection, prompt binding, iterative execution, parallel tools and follow-up chains Orchestration, planning/intake, chains
Declarative behavior Workspace resources, intent profiles, instructions, skills, templates and scoped YAML imports Workspace, profiles, skills, templates, binding
Models and knowledge Provider abstraction, embeddings, knowledge retrieval and budgeted augmentation Providers, embeddings, augmentation
Tools and interoperability Registry, bundles, internal services, MCP clients/resources and optional MCP/A2A exposure Tools, internal services, MCP, A2A
Human interaction Typed elicitation, forms, schema overlays, lookup inputs and governed approval Elicitation, overlays, lookups, approval
Conversations and context Durable history, queue control, continuation, recovery and model-visible context budgets Conversation model, context management, SDKs
Autonomous and background work Goals, usage accounting, controller continuation, async start/status/cancel and scheduled execution Goals, async, scheduler
Resources and multimodal input Uploaded/generated files, inspection, extraction, model presentation and optional speech transcription Resources, speech
Workspaces and reports UI ownership, authored controls/layouts, feeds, MCP Apps and durable report results UI ownership, feeds, MCP UI, report contracts
Security and lifecycle Identity propagation, scoped MCP credentials, access policies and owned state cleanup Authentication, authorization, deletion, maintenance

Supported adapters include OpenAI, Vertex AI Gemini/Claude, Bedrock Converse/Claude, Grok, InceptionLabs and Ollama. Actual streaming, multimodal input and token-count capabilities depend on the selected provider/model. Context limits and overflow recovery are configurable; optional proactive compaction is described with its agent settings.

Embed the runtime

Requires Go 1.25.8 or newer. Supply configured agent and model finders and the application's authenticated caller identity. This fragment illustrates runtime composition; see the SDK guide for the surrounding setup.

ctx := context.Background()
rt, err := executor.NewBuilder().
    WithAgentFinder(agentFinder).
    WithModelFinder(modelFinder).
    Build(ctx)
if err != nil {
    log.Fatal(err)
}
defer rt.Close(ctx)

backend, err := sdk.NewEmbeddedFromRuntime(rt)
if err != nil {
    log.Fatal(err)
}
out, err := backend.Query(ctx, &agentsvc.QueryInput{
    ConversationID: "conversation-id",
    UserId:         "authenticated-user-id",
    Query:          "Summarize the project documentation",
})

To expose clients over HTTP, create a handler from that backend and configure its authentication for the deployment:

handler, err := sdk.NewHandlerWithContext(ctx, backend)
if err != nil {
    log.Fatal(err)
}
log.Fatal(http.ListenAndServe(":8090", handler))

Client applications use POST /v1/ag-ui/run and its SSE output for conversation interaction. SDKs share the configured authentication/networking for supporting workspace, upload, reporting and history APIs. Refer to the SDK guide for Go, TypeScript, Swift and Kotlin, and the operation matrix for the standard protocol and Agently extension surface.

Workspace and persistence

The default embedded workspace is .agently in the working directory; AGENTLY_WORKSPACE selects another root. A resource ID selects an authored agent, model, tool bundle or other configuration object.

Resource location Responsibility
agents/ Agent identity, model selection, prompts, knowledge and execution settings
models/, embedders/ Provider/model configuration and embedding resources
mcp/, a2a/ MCP clients and agent-to-agent definitions
tools/bundles/, tools/instructions/ Tool groups, policy and instructions
intents/, skills/, templates/ Scenario profiles, reusable skills and output templates
workflows/, feeds/, callbacks/ Workflow, tool-output feed and interaction definitions
oauth/ Identity-provider resources
extension/forge/ Data sources, dialogs, lookups, models and windows for UI integration

The runtime resolves resources through finders and repositories. Workspace YAML supports reusable imports and scoped parameters; exact parameter substitutions preserve types. Application code can supply custom finders, register internal tool services, add provider adapters or integrate application handlers. Workspace resource APIs support reading and managing authored resources.

Customize behavior by composing agent configuration, tools, knowledge, intent profiles and templates. Customize presentation through application metadata, window definitions, data bindings, actions and themes. Forge is an independent data-driven UI framework used by Agently; Core owns the agent lifecycle and application-facing contracts around rendered content. See the workspace guide, tool system, UI ownership and SDK guide.

SQLite and MySQL persist conversations, execution records, goals, schedules and reports. The runtime preserves ownership and durable operation identity across continuation and cleanup. Scheduler API and runner deployment can be separated with AGENTLY_SCHEDULER_API and AGENTLY_SCHEDULER_RUNNER. Configuration and operational details live in the authentication, scheduler and maintenance guides.

Development

go test ./sdk ./internal/datly/contracttest ./app/store/data
(cd sdk/ts && npm ci && npm run typecheck && npm test)
swift test --package-path sdk/ios
(cd sdk/android && ./gradlew testDebugUnitTest testReleaseUnitTest)

Inspect go.mod and SDK manifests for dependencies. Android requires JDK 17 and the Android SDK; Swift requires its platform toolchain. Live provider, MCP and device tests require their service configuration and credentials.

The documentation index provides the full reading path. LICENSE · NOTICE

Design-system contributions

Start with the canonical usage guide before changing appearance, components or workspace theme contracts. The guide identifies the supported roles, real examples, extension path and existing checks. Include the reused components/roles, specimen and integration evidence, checks and remaining legacy limits in the pull request for shared-owner review.

Directories

Path Synopsis
adapter
http/callback
Package callback provides an HTTP handler that dispatches foreground submit events (forge custom_callback) to workspace-declared tool invocations.
Package callback provides an HTTP handler that dispatches foreground submit events (forge custom_callback) to workspace-declared tool invocations.
app
Package app groups application-level composition and bootstrapping packages.
Package app groups application-level composition and bootstrapping packages.
executor
Package executor provides runtime composition for agently-core.
Package executor provides runtime composition for agently-core.
executor/config
Package config defines executor-level defaults and tuning knobs.
Package config defines executor-level defaults and tuning knobs.
host/reporting
Package reporting owns workspace reporting discovery, reload lifecycle and neutral enrichment of framework windows and view catalogs.
Package reporting owns workspace reporting discovery, reload lifecycle and neutral enrichment of framework windows and view catalogs.
host/runtime
Package runtime composes operator-owned resource providers, authorization, immutable source snapshots and native window delivery for a workspace host.
Package runtime composes operator-owned resource providers, authorization, immutable source snapshots and native window delivery for a workspace host.
host/runtime/internal/testmetadata
Package testmetadata holds a frozen framework artifact used to verify host source composition independently of any embedding application's UI bundle.
Package testmetadata holds a frozen framework artifact used to verify host source composition independently of any embedding application's UI bundle.
store
Package store exposes application-facing persistence entrypoints.
Package store exposes application-facing persistence entrypoints.
store/agui
Package agui exposes durable AG-UI admission, continuation, projection, and replay.
Package agui exposes durable AG-UI admission, continuation, projection, and replay.
store/conversation
Package conversation contains conversation-domain contracts and helpers.
Package conversation contains conversation-domain contracts and helpers.
store/conversation/cancel
Package cancel provides conversation/turn cancellation registries.
Package cancel provides conversation/turn cancellation registries.
store/data
Package data provides Datly-backed read/write persistence services.
Package data provides Datly-backed read/write persistence services.
store/data/memory
Package memory provides an in-memory conversation client implementation.
Package memory provides an in-memory conversation client implementation.
store/elicitationreceipt
Package elicitationreceipt provides native transaction ownership for exact human-answer persistence and defers wakeups until confirmed commit.
Package elicitationreceipt provides native transaction ownership for exact human-answer persistence and defers wakeups until confirmed commit.
store/native
Package native opens the linked Datly 1.0 runtime for application callers.
Package native opens the linked Datly 1.0 runtime for application callers.
store/reporting
Package reporting provides persistence seams for reporting export jobs, downloadable artifacts, and shared reporting artifacts such as saved views and published snapshots.
Package reporting provides persistence seams for reporting export jobs, downloadable artifacts, and shared reporting artifacts such as saved views and published snapshots.
store/reportingevidence
Package reportingevidence persists immutable JSON evidence attached to an execution run.
Package reportingevidence persists immutable JSON evidence attached to an execution run.
store/toolapprovalclaim
Package toolapprovalclaim conditionally reserves a personal approval decision through the generated Datly writer before any external tool effect occurs.
Package toolapprovalclaim conditionally reserves a personal approval decision through the generated Datly writer before any external tool effect occurs.
store/toolapprovalqueue
Package toolapprovalqueue contains mutable types for user personal tool approval queue rows.
Package toolapprovalqueue contains mutable types for user personal tool approval queue rows.
store/turnqueue
Package turnqueue contains mutable types for conversation turn queue rows.
Package turnqueue contains mutable types for conversation turn queue rows.
workspace
Package workspace exposes application-level workspace startup helpers.
Package workspace exposes application-level workspace startup helpers.
cmd
agently command
datly command
mcpuiverifier command
Command mcpuiverifier is a dedicated remote MCP server used to verify the MCP UI extension end-to-end against the canonical extension SDK.
Command mcpuiverifier is a dedicated remote MCP server used to verify the MCP UI extension end-to-end against the canonical extension SDK.
ui-mcp command
e2e
assertion/colorword
Package colorword validates literal color readouts in native e2e fixtures.
Package colorword validates literal color readouts in native e2e fixtures.
cli/agently-app command
cli/agui_probe command
agui_probe is an isolated Endly observation adapter, not an application API.
agui_probe is an isolated Endly observation adapter, not an application API.
cli/datlycmd command
cli/mcpserver command
cli/server command
datly/authoring command
sdkcontract
Package sdkcontract builds a disposable application server for SDK transport tests.
Package sdkcontract builds a disposable application server for SDK transport tests.
startup/cmd/profile command
Command profile measures native runtime initialization independently of process launch, schema provisioning, application setup, and the first query.
Command profile measures native runtime initialization independently of process launch, schema provisioning, application setup, and the first query.
examples
primitive-navigation-mcp command
Command primitive-navigation-mcp is a standalone protected MCP menu producer.
Command primitive-navigation-mcp is a standalone protected MCP menu producer.
genai
llm
llm/provider/bedrock/converse
Package converse implements the provider-neutral Amazon Bedrock Converse API.
Package converse implements the provider-neutral Amazon Bedrock Converse API.
internal
auth/mcpauth
Package mcpauth defines the stable Agently-typed error surface for delegated MCP OAuth.
Package mcpauth defines the stable Agently-typed error surface for delegated MCP OAuth.
datly/agui/command
Package command composes resource mutations and AG-UI journal completion in one native Datly root transaction, through a trusted application capability.
Package command composes resource mutations and AG-UI journal completion in one native Datly root transaction, through a trusted application capability.
datly/agui/manage
Package manage owns the atomic AG-UI admission/continuation/journal workflow.
Package manage owns the atomic AG-UI admission/continuation/journal workflow.
datly/cleanupscope
Package cleanupscope validates host-only metadata read boundaries.
Package cleanupscope validates host-only metadata read boundaries.
datly/conversation/children/delete
Package delete provides key-only bulk deletion for a parent's trusted graph.
Package delete provides key-only bulk deletion for a parent's trusted graph.
datly/host
Package host links the selected persistence components for both the standalone executable and the embedded application.
Package host links the selected persistence components for both the standalone executable and the embedded application.
datly/link
Package datlylink selects only component slices with legacy/v1 parity tests.
Package datlylink selects only component slices with legacy/v1 parity tests.
datly/queryselectors
Package queryselectors forwards native selector capabilities to a component.
Package queryselectors forwards native selector capabilities to a component.
store/conversation
Package conversation maps trusted callers to the canonical transcribed conversation reader and writer.
Package conversation maps trusted callers to the canonical transcribed conversation reader and writer.
store/maintenancebatch
Package maintenancebatch bounds canonical writer requests without crossing the caller's authorization, expected-reference or transaction boundaries.
Package maintenancebatch bounds canonical writer requests without crossing the caller's authorization, expected-reference or transaction boundaries.
store/maintenancediag
Package maintenancediag provides opt-in timings for database maintenance.
Package maintenancediag provides opt-in timings for database maintenance.
store/maintenancelease
Package maintenancelease coordinates generated Datly components for distributed maintenance lease acquisition and ownership checks.
Package maintenancelease coordinates generated Datly components for distributed maintenance lease acquisition and ownership checks.
store/maintenancetx
Package maintenancetx contains policies used only by retention transactions.
Package maintenancetx contains policies used only by retention transactions.
store/reportaudit
Package reportaudit maps reporting audit events to the canonical Datly v1 reader and append-only writer.
Package reportaudit maps reporting audit events to the canonical Datly v1 reader and append-only writer.
store/schedulerlease
Package schedulerlease invokes the canonical generated schedule and run writers for scheduler lease claims and releases.
Package schedulerlease invokes the canonical generated schedule and run writers for scheduler lease claims and releases.
model
exportrequest
Package exportrequest carries trusted export-operation identity outside the model-visible tool arguments.
Package exportrequest carries trusted export-operation identity outside the model-visible tool arguments.
run
protocol
agui
Package agui implements the supported AG-UI 1.0 chat boundary.
Package agui implements the supported AG-UI 1.0 chat boundary.
agui/extensions
Package extensions defines versioned Agently AG-UI extension contracts.
Package extensions defines versioned Agently AG-UI extension contracts.
async/wsconfig
Package wsconfig applies operator-tunable async defaults to the Manager + narrator package.
Package wsconfig applies operator-tunable async defaults to the Manager + narrator package.
callback
Package callback defines the workspace resource that routes foreground UI submit events to tool invocations with payload templating.
Package callback defines the workspace resource that routes foreground UI submit events to tool invocations with payload templating.
datasource
Package datasource retains compatibility with shared Forge datasource contracts.
Package datasource retains compatibility with shared Forge datasource contracts.
intent
Package intent is the deprecated import path for authored playbooks.
Package intent is the deprecated import path for authored playbooks.
playbook
Package playbook is the preferred public profile model.
Package playbook is the preferred public profile model.
tool/service/system/async
Package async provides the system/async tool service.
Package async provides the system/async tool service.
tool/service/ui/metadata
Package metadata exposes Forge's neutral metadata projection over the normal tool/MCP adapter.
Package metadata exposes Forge's neutral metadata projection over the normal tool/MCP adapter.
ui/theme/cmd/generate command
Command generate refreshes the shared web/native theme fixtures.
Command generate refreshes the shared web/native theme fixtures.
ui/workspace
Package workspace defines conversation-owned UI descriptors shared by renderers.
Package workspace defines conversation-owned UI descriptors shared by renderers.
primitive module
resource module
window module
aguistate
Package aguistate projects normalized AG-UI events into durable protocol messages and shared state.
Package aguistate projects normalized AG-UI events into durable protocol messages and shared state.
clienttool
Package clienttool carries request-scoped frontend tools without modifying a backend registry.
Package clienttool carries request-scoped frontend tools without modifying a backend registry.
evidence
Package evidence carries server-installed, turn-scoped evidence boundaries.
Package evidence carries server-installed, turn-scoped evidence boundaries.
mcpapps
Package mcpapps carries request-scoped host-only MCP results separately from model-safe tool text.
Package mcpapps carries request-scoped host-only MCP results separately from model-safe tool text.
toolselection
Package toolselection holds discovery and schema activation for one turn.
Package toolselection holds discovery and schema activation for one turn.
scripts
authoring-inspect command
Command authoring-inspect exposes authored workspace definitions as JSON for structural contract tests.
Command authoring-inspect exposes authored workspace definitions as JSON for structural contract tests.
authoring-migrate command
Command authoring-migrate prepares a loss-checked workspace YAML to Markdown candidate.
Command authoring-migrate prepares a loss-checked workspace YAML to Markdown candidate.
sdk
api
rendering
Package rendering defines the dependency-light SDK wire contract for rich transcript content.
Package rendering defines the dependency-light SDK wire contract for rich transcript content.
service
a2a
agent
Package agent coordinates an agent turn across multiple responsibilities
Package agent coordinates an agent turn across multiple responsibilities
auth/providerregistry
Package providerregistry implements the workspace OAuth provider registry.
Package providerregistry implements the workspace OAuth provider registry.
browsermcp
Package browsermcp binds ephemeral browser MCP catalogs to authenticated conversation owners.
Package browsermcp binds ephemeral browser MCP catalogs to authenticated conversation owners.
callback
Package callback is the dispatch runtime for workspace callback definitions.
Package callback is the dispatch runtime for workspace callback definitions.
datasource
Package datasource implements Fetch over a declarative protocol/datasource DataSource.
Package datasource implements Fetch over a declarative protocol/datasource DataSource.
datasource/adapter
Package adapter wires the datasource service to the production tool dispatch path in internal/tool/registry.
Package adapter wires the datasource service to the production tool dispatch path in internal/tool/registry.
goal
Package goal implements the autonomous-system runtime above the durable goal persistence (Datly goal components) and the system/goal model tool.
Package goal implements the autonomous-system runtime above the durable goal persistence (Datly goal components) and the system/goal model tool.
lookup/overlay
Package overlay implements the server-side overlay layer: loading overlays, matching them against incoming JSON Schemas, evaluating per-overlay mode, composing the survivors with priority-based tie-break, and emitting forge Item.Lookup metadata onto matched properties.
Package overlay implements the server-side overlay layer: loading overlays, matching them against incoming JSON Schemas, evaluating per-overlay mode, composing the survivors with priority-based tie-break, and emitting forge Item.Lookup metadata onto matched properties.
maintenance
Package maintenance runs conversation, scheduled-run, orphan, and technical record maintenance through an injected Data store.
Package maintenance runs conversation, scheduled-run, orphan, and technical record maintenance through an injected Data store.
policy
Package policy provides workspace-configured authorization for discoverable runtime resources.
Package policy provides workspace-configured authorization for discoverable runtime resources.
reportdefinition
Package reportdefinition compiles authored Agently ReportDefinition YAML into Forge's canonical report artifacts.
Package reportdefinition compiles authored Agently ReportDefinition YAML into Forge's canonical report artifacts.
reporting
Package reporting defines the agently-core reporting runtime boundary for canonical compile/fill/print-backed export operations.
Package reporting defines the agently-core reporting runtime boundary for canonical compile/fill/print-backed export operations.
reporting/catalog
Package catalog preserves Core imports while delegating to the shared runtime.
Package catalog preserves Core imports while delegating to the shared runtime.
resource
Package resource preserves Core imports while delegating to the shared runtime.
Package resource preserves Core imports while delegating to the shared runtime.
resource/provider
Package provider preserves Core imports while delegating to the shared runtime.
Package provider preserves Core imports while delegating to the shared runtime.
ui/style
Package style compiles workspace-owned theme assets into immutable snapshots.
Package style compiles workspace-owned theme assets into immutable snapshots.
ui/tablepreference
Package tablepreference validates presentation preferences exchanged with an external adapter.
Package tablepreference validates presentation preferences exchanged with an external adapter.
tools
schema command
schema initializes a disposable local discovery fixture, never a product DB.
schema initializes a disposable local discovery fixture, never a product DB.
Package workspace defines workspace roots, kinds, and storage abstractions.
Package workspace defines workspace roots, kinds, and storage abstractions.
hotswap
Package hotswap provides workspace change detection and live reload hooks.
Package hotswap provides workspace change detection and live reload hooks.
loader
Package loader contains workspace resource loading subpackages.
Package loader contains workspace resource loading subpackages.
loader/embedder
Package embedder loads embedder provider configurations from workspace resources.
Package embedder loads embedder provider configurations from workspace resources.
loader/fs
Package fs provides generic filesystem-backed decoding/loading helpers.
Package fs provides generic filesystem-backed decoding/loading helpers.
loader/model
Package model loads model provider configurations from workspace resources.
Package model loads model provider configurations from workspace resources.
overlay
Package overlay provides in-memory overlay loading on top of workspace files.
Package overlay provides in-memory overlay loading on top of workspace files.
repository
Package repository contains typed workspace persistence adapters.
Package repository contains typed workspace persistence adapters.
repository/base
Package base provides common repository helpers over workspace stores.
Package base provides common repository helpers over workspace stores.
repository/callback
Package callback is the workspace repository for callback definitions.
Package callback is the workspace repository for callback definitions.
repository/embedder
Package embedder provides workspace repository access for embedder configs.
Package embedder provides workspace repository access for embedder configs.
repository/forgedatasource
Package forgedatasource loads extension/forge/datasources/*.yaml workspace resources.
Package forgedatasource loads extension/forge/datasources/*.yaml workspace resources.
repository/forgelookup
Package forgelookup loads extension/forge/lookups/*.yaml overlay files.
Package forgelookup loads extension/forge/lookups/*.yaml overlay files.
repository/mcp
Package mcp provides workspace repository access for MCP client definitions.
Package mcp provides workspace repository access for MCP client definitions.
repository/model
Package model provides workspace repository access for model configs.
Package model provides workspace repository access for model configs.
repository/oauthprovider
Package oauthprovider loads workspace OAuth provider definitions from <workspace>/oauth/providers/<provider>.yaml.
Package oauthprovider loads workspace OAuth provider definitions from <workspace>/oauth/providers/<provider>.yaml.
repository/toolbundle
Package toolbundle provides workspace repository access for tool bundle specs.
Package toolbundle provides workspace repository access for tool bundle specs.
repository/toolplaybook
Package toolplaybook provides workspace repository access for tool instructions/playbooks.
Package toolplaybook provides workspace repository access for tool instructions/playbooks.
service
Package service contains workspace-facing service adapters.
Package service contains workspace-facing service adapters.
service/meta
Package meta provides workspace metadata discovery for loaders and handlers.
Package meta provides workspace metadata discovery for loaders and handlers.
service/meta/yml
Package yml provides YAML node helpers used by workspace metadata services.
Package yml provides YAML node helpers used by workspace metadata services.
store
Package store contains workspace storage backend implementations.
Package store contains workspace storage backend implementations.
store/fs
Package fs provides filesystem-backed workspace stores.
Package fs provides filesystem-backed workspace stores.
transfer
Package transfer provides import/export helpers for workspace resources.
Package transfer provides import/export helpers for workspace resources.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL