agent

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package agent wires the conductor together: its own store, a Podium API client, the profile directory, the sources, and one HTTP server for the AgentService, health and metrics. It imports nothing from internal/server or internal/node — podium-agent is an ordinary API client of the control plane.

Index

Constants

View Source
const ShutdownTimeout = 10 * time.Second

ShutdownTimeout is how long Run gives in-flight work to finish after a signal.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent is a configured, not-yet-listening conductor.

func New

func New(ctx context.Context, cfg config.Config, logger *slog.Logger) (*Agent, error)

New opens the store, migrates it, loads the profile and builds every handler. It does not bind a socket; call Run for that.

func (*Agent) Addr

func (a *Agent) Addr() string

Addr is the address the API is listening on, once Run has bound it.

func (*Agent) Close

func (a *Agent) Close()

Close releases the store. It is safe to call on a partially built Agent.

func (*Agent) Run

func (a *Agent) Run(ctx context.Context) error

Run binds the listener, starts the sources and the turn loop, and blocks until ctx is cancelled.

Directories

Path Synopsis
Package api is the conductor's own HTTP surface: the AgentService handlers, the bearer that guards them, and the health and metrics endpoints.
Package api is the conductor's own HTTP surface: the AgentService handlers, the bearer that guards them, and the health and metrics endpoints.
Package chat is the web chat: the third conductor.Source, and the only one whose conversation Podium itself holds.
Package chat is the web chat: the third conductor.Source, and the only one whose conversation Podium itself holds.
Package conductor is the turn loop: an inbound message becomes one Podium task running the agent runtime image, what the task says is relayed back to where the message came from, and the turn is recorded.
Package conductor is the turn loop: an inbound message becomes one Podium task running the agent runtime image, what the task says is relayed back to where the message came from, and the turn is recorded.
fakesource
Package fakesource is an in-memory conductor.Source: a channel of inbound events and an ordered record of everything the conductor said back.
Package fakesource is an in-memory conductor.Source: a channel of inbound events and an ordered record of everything the conductor said back.
Package config is the whole of podium-agent's configuration.
Package config is the whole of podium-agent's configuration.
Package ghreview is the GitHub App as a conductor.Source: webhooks turned into inbound events, comments posted back as the App, and Slack threads that asked for the same pull-request review joined onto the same session.
Package ghreview is the GitHub App as a conductor.Source: webhooks turned into inbound events, comments posted back as the App, and Slack threads that asked for the same pull-request review joined onto the same session.
Package github is the conductor's client of a GitHub App: it turns an App id and a private key into the short-lived installation tokens a turn clones, fetches and pushes with.
Package github is the conductor's client of a GitHub App: it turns an App id and a private key into the short-lived installation tokens a turn clones, fetches and pushes with.
Package linear is the bot's Linear identity: assigned issues polled into inbound events, and the five ways the conductor talks back.
Package linear is the bot's Linear identity: assigned issues polled into inbound events, and the five ways the conductor talks back.
Package mcp is the conductor's registry of MCP servers: what one is, what a name may be, and which Podium secret and environment variable a server's credential travels in.
Package mcp is the conductor's registry of MCP servers: what one is, what a name may be, and which Podium secret and environment variable a server's credential travels in.
Package memory is the conductor's client of Hindsight, the agents' shared memory.
Package memory is the conductor's client of Hindsight, the agents' shared memory.
Package podium is the conductor's client of the Podium API.
Package podium is the conductor's client of the Podium API.
Package profiles is the bot's identity and its playbooks: what a playbook is, how one is validated, and how the directory on disk (PODIUM_AGENT_PROFILE_DIR) is loaded.
Package profiles is the bot's identity and its playbooks: what a playbook is, how one is validated, and how the directory on disk (PODIUM_AGENT_PROFILE_DIR) is loaded.
Package skills is a third-party Agent Skill on its way into a task container: what a bundle is, how one is read off the conductor's own disk, and the guards it has to pass before any of it reaches a turn.
Package skills is a third-party Agent Skill on its way into a task container: what a bundle is, how one is read off the conductor's own disk, and the guards it has to pass before any of it reaches a turn.
Package slack holds the bot's Slack identity: a Socket Mode connection, mentions turned into inbound events, and the four ways the conductor talks back.
Package slack holds the bot's Slack identity: a Socket Mode connection, mentions turned into inbound events, and the four ways the conductor talks back.
Package store is the conductor's own Postgres database (podium_agent): sessions, turns, the relay ledger and its settings.
Package store is the conductor's own Postgres database (podium_agent): sessions, turns, the relay ledger and its settings.
db

Jump to

Keyboard shortcuts

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