Skip to content

Create and publish an agent

This guide covers the lifecycle of an agent from design to production: defining what it should do, writing the spec, validating it locally, and promoting it to a shared environment.

Decide the agent’s purpose and boundaries before opening an editor:

  • What question or task will it handle?
  • Which LLM provider and model are appropriate for the job?
  • What tools or knowledge does it need?
  • What could go wrong, and which shields or approvals should guard against it?
  • Which channel or application will invoke it?

An agent spec answers four questions:

  1. Identity — a unique identifier, display name, description, and role tier.
  2. Behavior — system prompt, evaluation strategy, and memory settings.
  3. Capabilities — tools, knowledge bases, and channels.
  4. Protection — shields, empathy rules, and human approval gates.

Keep the spec focused. A single agent that tries to do everything is harder to test, secure, and audit than a small set of specialized agents.

  1. Create an agentspace for local development so your experiments are isolated.

  2. Register any secrets the agent needs, such as API keys, using the registry. Never paste secrets into the agent spec.

  3. Load the spec into the local registry and run a dry-run or sample conversation.

  4. Review the worklog for the test run to confirm the agent used the expected tools and did not make unexpected calls.

Before promoting the agent, test edge cases:

  • Prompt-injection attempts and off-topic questions.
  • Missing or malformed tool outputs.
  • Long conversations that trigger memory summarization.
  • Approval-required tools to confirm the handoff works.

Use the worklog and traces to verify that shields fired when expected and that the agent stayed within its role tier.

  1. Version the spec in your registry or source-control system.

  2. Package the agentspace as an OCI artifact if you distribute agents across environments.

  3. Deploy to the production runtime using the registry API or CI/CD pipeline.

  4. Enable the channel or application integration that will invoke the agent.

  5. Monitor early traffic for errors, latency, and unexpected behavior.

  • Start with a narrow scope and expand after measuring quality.
  • Keep system prompts explicit; avoid vague instructions such as “be helpful.”
  • Reference secrets by name so credentials can be rotated without changing the spec.
  • Pair powerful tools with shields or approval gates.
  • Document the intended use and known limitations of each agent.