Skip to content
LACE
  • v0.1 Current
  • Python
  • TypeScript Soon

lace-app-sdk

Agents & skills

Declare an AgentDefinition and it runs a real agentic loop in your sidecar — the model chooses tools; the platform enforces capabilities, loop guards, and approval gates.

app/agents.pypython
# app/agents.py — a real agentic loop, with an approval gate on the risky tool.
from lace_app_sdk.agents import AgentDefinition, ToolCapability
from lace_app_sdk.skills import AgentSkill

class AgentProvider:
    app_id = "acme.field_intake"

    def agent_definitions(self):
        return [
            AgentDefinition(
                agent_id="intake-triage",
                slug="intake-triage",
                name="Intake Triage",
                description="Classifies tickets, drafts replies with citations.",
                capabilities=[
                    ToolCapability(tool_id="lookup_ticket"),
                    ToolCapability(tool_id="escalate", approval_required=True),
                ],
            )
        ]

Approval gates

Set approval_required=True on a capability and every invocation pauses for human sign-off before it executes. The run is suspended durably, not held in memory, so an approval that arrives an hour later resumes the same run rather than starting a new one.

Capabilities are the boundary

An agent can use exactly the tools listed in its capabilities and nothing else. Because that list is part of the declaration rather than the prompt, it cannot be talked around: a model that decides it should escalate still goes through the gate.

Skills

AgentSkill declares reusable in-loop behaviours inside an agent definition, so common procedures are shared across agents instead of being re-prompted into each one.

See Agents & channels for deploying an agent to email, SMS, Slack, Teams, or voice.