container lifecycle management
This commit is contained in:
21
doc/agent_harness_flow.md
Normal file
21
doc/agent_harness_flow.md
Normal file
@@ -0,0 +1,21 @@
|
||||
┌─────────────────────────────────────────────────┐
|
||||
│ Agent Harness (your servers) │
|
||||
│ │
|
||||
│ on_message(user_id, message): │
|
||||
│ 1. Look up user's MCP endpoint from Postgres │
|
||||
│ 2. mcp.call("get_context_summary") │
|
||||
│ 3. mcp.call("get_conversation_history", 20) │
|
||||
│ 4. Build prompt: │
|
||||
│ system = BASE_PROMPT │
|
||||
│ + context_summary │
|
||||
│ + user_agent_prompt (from MCP) │
|
||||
│ messages = history + new message │
|
||||
│ 5. LLM call (your API key) │
|
||||
│ 6. While LLM wants tool calls: │
|
||||
│ - Platform tools → handle locally │
|
||||
│ - User tools → proxy to MCP │
|
||||
│ - LLM call again with results │
|
||||
│ 7. mcp.call("save_message", ...) │
|
||||
│ 8. Return response to user │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────┘
|
||||
Reference in New Issue
Block a user