Skip to content

Long context and Short context agents (JSON response for both)#10

Open
haplesshero13 wants to merge 4 commits intomainfrom
long-context
Open

Long context and Short context agents (JSON response for both)#10
haplesshero13 wants to merge 4 commits intomainfrom
long-context

Conversation

@haplesshero13
Copy link
Owner

Long Context differences from LLMAgent (Far AI version):

  • Full multi-turn chat history maintained (no summarization/truncation)
  • Single system prompt passed, never varies
  • Each user turn gives all game state information and available actions for this turn
  • Structured JSON output (not free-text with [Action] tags)
  • Token usage captured from OpenRouter API responses, costs captured as well
  • Reasoning and non-reasoning models handled via OpenRouter model info
  • Per-player JSONL logging with unified thinking + action fields, for reasoning and non-reasoning models

Short Context subclasses Long Context and simply restores the previous memory summarization field, instead of creating a multi-turn conversation. Gets reasoning from reasoning models, tells regular models to output "thinking", but only the previous memory is captured and sent back in the next turn's prompt (just like the original Far AI version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant