Agent source
Everything in the browser below is mirrored verbatim from the agent's source tree in the AIMO repository: the six packages the published image is built from (agent, core, dbtype, executor, jobs and monitors). Nothing here is a simplified or rewritten example.
A few starting points:
- Connection loop (
agent/jobs/agent_worker.py): the outbound WebSocket connection to AIMO: backoff, JWT refresh, idle reconnect, the queue that carries results across a disconnect. See Security: network boundary. - Running monitors (
agent/monitor/process.py): turns monitor definitions into a grouped SQL query and returns only the aggregates. See Security: aggregates, not raw rows. - Validation (
agent/monitor/validate_artifacts.py,agent/monitor/validate_table_characteristics.py): the two safety gates of Operations, run on your database before a monitor is stored. - Compiling a spec (
monitors/compiler/,monitors/sql_validation.py): the family algebra becoming one bounded statement, and the syntax-tree check every free-form fragment passes first. - Credential encryption (
executor/credentials.py): scrypt and AES-256-GCM, applied before anything leaves your environment. See Security: database credentials. - The database adapters (
dbtype/): one dialect per engine, with the read-only session mode and the regex spelling each one uses. - Configuration surface (
agent/settings.py): the environment variables behind the Agent CLI requirements.
Browse the agent source75 files, mirrored verbatim — tree navigation, full syntax highlighting.
Related
- Architecture: network layout and trust boundaries.
- Security: the properties this code implements.
- Agent CLI: the commands built on top of this code.
- Operations: the job types the running agent executes.