An Agent is a logical actor that issues governed calls — a customer support bot, an internal coding assistant, a sub-routine of a larger orchestrator. Every governed call is attributed to exactly one Agent on the dashboard so you can review activity, scope policies, and report on usage.Documentation Index
Fetch the complete documentation index at: https://docs.egisai.co/llms.txt
Use this file to discover all available pages before exploring further.
The default attribution
When you callegisai.init(app="customer-support-bot"), that name becomes the
default Agent for the process. Unless overridden, every governed call is
attributed to it.
Agents are auto-created in your organization on first sight — if no Agent with
that name exists, the SDK registers one for you and the dashboard’s Agents page
updates live. There is no manual onboarding step.
customer-support-bot.
Sub-agents and per-call identity
Real applications often have several distinct flows running inside the same process — a triage agent, a billing agent, a coding agent. To attribute calls to a sub-agent without re-initializing the SDK, useegisai.set_context():
set_context() writes to a per-task context variable, so async tasks and
threads inherit the value cleanly without leaking across requests.
The first time the SDK sees a new agent name it registers it with the platform;
subsequent calls are a cache hit.
See the set_context reference for every
parameter and Multi-agent context for end-to-end
patterns.
Resolution precedence
When attributing a call, the SDK uses the first identity it finds in this order:- An explicit
agent_idon the active context (fromset_context(agent_id=...)). - An explicit
agentname on the active context (fromset_context(agent=...)). - A system-prompt fingerprint matching a known sub-agent profile.
- The process-level default (
appfromegisai.init()).
Why the system prompt matters
When two calls share a system prompt, they almost certainly come from the same logical agent. The SDK fingerprints the system prompt of each call and uses that to keep distinct agents distinct on the dashboard, even when the operator hasn’t set an explicitset_context(agent=...) for them. This means:
- Two helpers in the same process with different system prompts show up as two Agents.
- Restarting your process keeps the same fingerprints, so historical activity joins up correctly.
set_context(agent=...) to a friendly name; the explicit value wins.
Multi-tenant attribution
If you serve multiple end-customers from a single deployment, attach the end-customer identity per request usingset_context(user_id=..., session_id=...).
Those fields land on each audit event for the lifetime of the context and do
not affect agent attribution.
What’s next
Multi-agent context
Patterns for distinguishing several agents in one process.
set_context reference
Every accepted parameter and what it sets.