In this tutorial, you'll build a working multi-agent data pipeline using Neam, an agentic AI programming language. By the end, you'll have a DIO orchestrating five agents through a churn prediction workflow.
Step 1: Define Your Infrastructure Profile. This tells every agent where data lives and what compliance rules apply:
infrastructure_profile MyInfra {
data_warehouse: {
platform: "postgres",
connection: env("DB_URL")
},
governance: { regulations: ["GDPR"] }
}
Step 2: Declare Your Agents. Each agent is a specialist. Note the budget constraints:
budget B { cost: 50.00, tokens: 500000 }
databa agent MyBA { provider: "openai",
model: "gpt-4o", budget: B }
datascientist agent MyDS { provider: "openai",
model: "gpt-4o", budget: B }
datatest agent MyDT { provider: "openai",
model: "gpt-4o", budget: B }
Step 3: Wire Up the DIO. The orchestrator coordinates everything:
budget DioBudget { cost: 500.00, tokens: 2000000 }
dio agent MyDIO {
mode: "hybrid",
task: "Predict customer churn, identify drivers",
infrastructure: MyInfra,
agent_md: "./my_domain.agent.md",
provider: "openai", model: "gpt-4o",
budget: DioBudget
}
let result = dio_solve(MyDIO, task)
print(result)
Step 4: Create Your Agent.MD. This is the secret weapon — encode domain knowledge:
## @organization-context
Company: My E-Commerce Co
Scale: 500K customers, 5M orders
## @known-data-issues
- signup_date timezone drift before 2024-03
- Product ratings skew positive (self-reported)
## @agent-preferences
DataScientist: XGBoost for tabular, AUC-ROC metric
Run it: neam-cli run my_pipeline.neam
Welcome to Neam Ecosystem
Top comments (0)