mirror of
https://github.com/hanzoai/agents.git
synced 2026-10-30 18:48:36 +00:00
Transforms hanzoai/agents from a marketplace config repo into a full agent orchestration platform by merging the AgentField infrastructure: - Go control plane (K8s-like agent orchestration, service mesh, DAG workflows) - Python SDK (FastAPI-based agent framework, LiteLLM, memory, DID/VC) - TypeScript SDK (@hanzo/agents - Vercel AI SDK, MCP, workflows) - Go SDK (idiomatic agent builder + client) - React 19 embedded dashboard (XyFlow DAGs, Recharts, Radix UI) - Docker/K8s/Helm deployment configs - Examples: hello world, deep research, RAG, simulation, benchmarks - Functional test suite across Python/Go/TypeScript All references rebranded: AgentField → Hanzo Agents - Module: github.com/hanzoai/agents/control-plane - Python: hanzo_agents - TypeScript: @hanzo/agents - Go: github.com/hanzoai/agents/sdk/go - Env vars: HANZO_AGENTS_* - Config: hanzo-agents.yaml Previous marketplace configs moved to config/ directory.
35 lines
944 B
TypeScript
35 lines
944 B
TypeScript
import 'dotenv/config';
|
|
import { Agent } from '@hanzo-agents/sdk';
|
|
import { reasonersRouter } from './reasoners.js';
|
|
|
|
|
|
async function main() {
|
|
const agent = new Agent({
|
|
nodeId: process.env.AGENT_ID ?? "init-example",
|
|
controlPlaneUrl: process.env.HANZO_AGENTS_URL ?? 'http://localhost:8080',
|
|
port: Number(process.env.PORT ?? 8005),
|
|
publicUrl: process.env.AGENT_CALLBACK_URL,
|
|
version: '1.0.0',
|
|
devMode: true,
|
|
apiKey: process.env.HANZO_AGENTS_API_KEY,
|
|
aiConfig: {
|
|
provider: 'openai',
|
|
model: 'gpt-4o',
|
|
apiKey: process.env.OPENAI_API_KEY,
|
|
},
|
|
});
|
|
|
|
agent.includeRouter(reasonersRouter);
|
|
|
|
await agent.serve();
|
|
console.log(`Agent "${agent.config.nodeId}" listening on http://localhost:${agent.config.port}`);
|
|
}
|
|
|
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
main().catch((err) => {
|
|
// eslint-disable-next-line no-console
|
|
console.error(err);
|
|
process.exit(1);
|
|
});
|
|
}
|